biowait(D3DK) —
NAME
biowait − suspend processes pending completion of block I/O .IX \f4biowait\fP(D3DK)
SYNOPSIS
#include <sys/types.h>
#include <sys/buf.h>
int biowait(buf_t ∗bp);
ARGUMENTS
bpPointer to the buffer header structure.
DESCRIPTION
The biowait function suspends process execution during block I/O. Block drivers that have allocated their own buffers with geteblk(D3DK), getrbuf(D3DK), or ngeteblk(D3DK) can use biowait to suspend the current process execution while waiting for a read or write request to complete.
Drivers using biowait must use biodone(D3DK) in their I/O completion handlers to signal biowait when the I/O transfer is complete.
RETURN VALUE
If an error occurred during the I/O transfer, the error number is returned. Otherwise, on success, 0 is returned.
LEVEL
Base Only.
NOTES
Can sleep.
Driver-defined basic locks and read/write locks may not be held across calls to this function.
Driver defined sleep locks may be held across calls to this function.
SEE ALSO
intr(D2DK), strategy(D2DK), biodone(D3DK), geteblk(D3DK), getrbuf(D3DK), ngeteblk(D3DK), buf(D4DK)
DDI/DKI