Copyright (c) 2003, Sun Microsystems, Inc., All Rights Reserved
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.
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.
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]
#include <sys/sunldi.h> int ldi_aread(ldi_handle_t lh, struct aio_req *aio_reqp, cred_t *cr);
int ldi_awrite(ldi_handle_t lh, struct aio_req *aio_reqp, cred_t *cr);
lh
Layered handle.
cr
Pointer to a credential structure.
aio_reqp
Pointer to the aio_req(9S) structure that describes where the data is to be stored or obtained from.
The ldi_awrite() function passes an asynchronous write request to a device entry point specified by the layered handle. This operation is supported for block and character devices.
The ldi_aread() function passes an asynchronous read request to a device entry point specified by the layered handle. This operation is supported for block and character devices.
The ldi_awrite() and ldi_aread() functions return 0 upon success. If a failure occurs before the request is passed on to the device, the possible return values are shown below. Otherwise any other error number may be returned by the device.
EINVAL
Invalid input parameters.
ENOTSUP
Operation is not supported for this device.
These functions may be called from user context.