9022 loader.efi: module placement must check memory map
[unleashed.git] / share / man / man9f / biowait.9f
blobb282671e11519a630df88d9344e8b343e85ca756
1 '\" te
2 .\"  Copyright 1989 AT&T
3 .\" Copyright (c) 1997, Sun Microsystems, Inc., All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH BIOWAIT 9F "Apr 11, 1991"
8 .SH NAME
9 biowait \- suspend processes pending completion of block I/O
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/types.h>
14 #include <sys/buf.h>
18 \fBint\fR \fBbiowait\fR(\fBstruct buf *\fR\fIbp\fR);
19 .fi
21 .SH INTERFACE LEVEL
22 .sp
23 .LP
24 Architecture independent level 1 (DDI/DKI).
25 .SH PARAMETERS
26 .sp
27 .ne 2
28 .na
29 \fB\fIbp\fR \fR
30 .ad
31 .RS 7n
32 Pointer to the \fBbuf\fR structure describing the transfer.
33 .RE
35 .SH DESCRIPTION
36 .sp
37 .LP
38 Drivers allocating their own  \fBbuf\fR structures with  \fBgetrbuf\fR(9F) can
39 use the \fBbiowait()\fR function to suspend the current thread and wait for
40 completion of  the transfer.
41 .sp
42 .LP
43 Drivers  must call \fBbiodone\fR(9F) when the transfer is complete to notify
44 the thread blocked by \fBbiowait()\fR. \fBbiodone()\fR is usually called in the
45 interrupt routine.
46 .SH RETURN VALUES
47 .sp
48 .ne 2
49 .na
50 \fB\fB0\fR \fR
51 .ad
52 .RS 12n
53 Upon success
54 .RE
56 .sp
57 .ne 2
58 .na
59 \fB\fBnon-zero\fR\fR
60 .ad
61 .RS 12n
62 Upon \fBI/O\fR failure.  \fBbiowait()\fR calls \fBgeterror\fR(9F) to retrieve
63 the error number which it returns.
64 .RE
66 .SH CONTEXT
67 .sp
68 .LP
69 \fBbiowait()\fR can be called from user context only.
70 .SH SEE ALSO
71 .sp
72 .LP
73 \fBbiodone\fR(9F), \fBgeterror\fR(9F), \fBgetrbuf\fR(9F), \fBbuf\fR(9S)
74 .sp
75 .LP
76 \fIWriting Device Drivers\fR