1biowait(9F)              Kernel Functions for Drivers              biowait(9F)
2
3
4

NAME

6       biowait - suspend processes pending completion of block I/O
7

SYNOPSIS

9       #include <sys/types.h>
10       #include <sys/buf.h>
11
12
13
14       int biowait(struct buf *bp);
15
16

INTERFACE LEVEL

18       Architecture independent level 1 (DDI/DKI).
19

PARAMETERS

21       bp     Pointer to the buf structure describing the transfer.
22
23

DESCRIPTION

25       Drivers  allocating their own  buf structures with  getrbuf(9F) can use
26       the biowait() function to suspend the current thread and wait for  com‐
27       pletion of  the transfer.
28
29
30       Drivers   must call biodone(9F) when the transfer is complete to notify
31       the thread blocked by biowait(). biodone() is  usually  called  in  the
32       interrupt routine.
33

RETURN VALUES

35       0           Upon success
36
37
38       non-zero    Upon I/O failure.  biowait() calls geterror(9F) to retrieve
39                   the error number which it returns.
40
41

CONTEXT

43       biowait() can be called from user context only.
44

SEE ALSO

46       biodone(9F), geterror(9F), getrbuf(9F), buf(9S)
47
48
49       Writing Device Drivers
50
51
52
53SunOS 5.11                        11 Apr 1991                      biowait(9F)
Impressum