Go to the first, previous, next, last section, table of contents.
device_read
reads bytes_wanted bytes from
device, and stores them in a buffer allocated with
vm_allocate
, which address is returned in data. The caller
must deallocated it if it is no longer needed. The number of bytes
actually returned is stored in data_count.
If mode is D_NOWAIT
, the operation does not block.
Otherwise mode should be 0. recnum is the record number to
be read, its meaning is device specific.
The function returns D_SUCCESS
if some data was successfully
read, D_WOULD_BLOCK
if no data is currently available and
D_NOWAIT
is specified, and D_NO_SUCH_DEVICE
if
device does not denote a device port.
device_read_inband
function works as the device_read
function, except that the data is returned "inband" in the reply IPC
message.
device_read
function.
device_read_request
performs the read request. The meaning for
the parameters is as in device_read
. Additionally, the caller
has to supply a reply port to which the ds_device_read_reply
message is sent by the kernel when the read has been performed. The
return value of the read operation is stored in return_code.
As neither function receives a reply message, only message transmission
errors apply. If no error occurs, KERN_SUCCESS
is returned.
device_read_request_inband
and
ds_device_read_reply_inband
functions work as the
device_read_request
and ds_device_read_reply
functions,
except that the data is returned "inband" in the reply IPC message.
Go to the first, previous, next, last section, table of contents.