Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / ldi_aread.9f
blob49ed1c27d37bf19529dd3221d8337e0161632540
1 '\" te
2 .\"  Copyright (c) 2003, Sun Microsystems, Inc.,  All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH LDI_AREAD 9F "Jun 3, 2003"
7 .SH NAME
8 ldi_aread, ldi_awrite \- Issue an asynchronous read or write request to a
9 device
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/sunldi.h>
15 \fB\fR\fBint\fR ldi_aread(\fBldi_handle_t\fR \fIlh\fR, \fB struct aio_req *\fR\fIaio_reqp\fR, \fBcred_t *\fR\fIcr\fR);
16 .fi
18 .LP
19 .nf
20 \fBint\fR \fB ldi_awrite\fR(\fBldi_handle_t\fR \fIlh\fR, \fB struct aio_req *\fR\fIaio_reqp\fR, \fBcred_t *\fR\fIcr\fR);
21 .fi
23 .SH PARAMETERS
24 .sp
25 .ne 2
26 .na
27 \fB\fIlh\fR \fR
28 .ad
29 .RS 13n
30 Layered handle.
31 .RE
33 .sp
34 .ne 2
35 .na
36 \fB\fIcr\fR \fR
37 .ad
38 .RS 13n
39 Pointer to a credential structure.
40 .RE
42 .sp
43 .ne 2
44 .na
45 \fB\fIaio_reqp\fR \fR
46 .ad
47 .RS 13n
48 Pointer to the \fBaio_req(9S)\fR structure that describes where the data is to
49 be stored or obtained from.
50 .RE
52 .SH DESCRIPTION
53 .sp
54 .LP
55 The \fBldi_awrite()\fR function passes an asynchronous write request to a
56 device entry point specified by the layered handle. This operation is supported
57 for block and character devices.
58 .sp
59 .LP
60 The \fBldi_aread()\fR function passes an asynchronous read request to a device
61 entry point specified by the layered handle. This operation is supported for
62 block and character devices.
63 .SH RETURN VALUES
64 .sp
65 .LP
66 The \fBldi_awrite()\fR and \fBldi_aread()\fR functions return \fB0\fR upon
67 success. If a failure occurs before the request is passed on to the device, the
68 possible return values are shown below. Otherwise any other error number may be
69 returned by the device.
70 .sp
71 .ne 2
72 .na
73 \fBEINVAL\fR
74 .ad
75 .RS 11n
76 Invalid input parameters.
77 .RE
79 .sp
80 .ne 2
81 .na
82 \fBENOTSUP\fR
83 .ad
84 .RS 11n
85 Operation is not supported for this device.
86 .RE
88 .SH CONTEXT
89 .sp
90 .LP
91 These functions may be called from user context.