Back to Darwin Xnu

Device Write Async

osfmk/man/device_write_async.html

latest1.5 KB
Original Source

device_write_async


System Trap - Write a sequence of bytes to a device object.

SYNOPSIS

**kern\_return\_t device\_write\_async**** (mach\_port\_t **device,** mach\_port\_t **queue,** mach\_port\_t **request\_id,** dev\_mode\_t **mode,** recnum\_t **recnum,** io\_buf\_ptr\_t **data,** io\_buf\_len\_t **bytes\_wanted** );**

PARAMETERS

device[in device send right] A device port to the device to be read.

queue[in io_done queue send right] The port returned from io_done_queue_create.

request_id[in send right] An unique request identifier that will be passed back as part of the io_done_result structure.

mode[in scalar] I/O mode value. Meaningful options are:

D_NOWAIT Do not wait if data is unavailable.

recnum[in scalar] Record number to be read.

data[pointer to in array of bytes] Data bytes to be written.

bytes_wanted[in scalar] Size of data transfer.

DESCRIPTION

The device_write_async function enqueues a write operation for a sequence of bytes to a device object. The meaning of recnum as well as the specific operation performed is device dependent.

RETURN VALUES

device_write_async returns only invalid parameter errors.

Functions: device_read_async_inband, device_read_overwrite_async, device_write_async_inband, io_done_queue_create.