device_read_async
System Trap - Read a sequence of bytes from a device object.
SYNOPSIS
kern_return_t device_read_async
(mach_port_t device,
mach_port_t queue,
mach_port_t request_id,
dev_mode_t mode,
recnum_t recnum,
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.
- bytes_wanted
-
[in scalar] Size of data transfer.
DESCRIPTION
The device_read_async interface enqueues a read operation for a
sequence of bytes from a device object. The meaning of recnum as well
as the specific operation performed is device dependent.
RETURN VALUES
device_read_async returns only invalid parameter errors.
-
RELATED INFORMATION
Functions:
device_read_async_inband,
device_read_overwrite_async,
device_write_async,
device_write_async_inband,
io_done_queue_create.