Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

ldi_awrite(9F)

Name

ldi_aread, ldi_awrite - Issue an asynchronous read or write request to a device

Synopsis

#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);

Parameters

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.

Description

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.

Return Values

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.

Context

These functions may be called from user context.