]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/device_read_async.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / device_read_async.html
1 <h2>device_read_async</h2>
2 <hr>
3 <p>
4 <strong>System Trap</strong> - Read a sequence of bytes from a device object.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t device_read_async</strong>
8 <strong>(mach_port_t</strong> <var>device</var>,
9 <strong>mach_port_t</strong> <var>queue</var>,
10 <strong>mach_port_t</strong> <var>request_id</var>,
11 <strong>dev_mode_t</strong> <var>mode</var>,
12 <strong>recnum_t</strong> <var>recnum</var>,
13 <strong>io_buf_len_t</strong> <var>bytes_wanted</var><strong>);</strong>
14 </pre>
15 <h3>PARAMETERS</h3>
16 <dl>
17 <p>
18 <dt> <var>device</var>
19 <dd>
20 [in device send right] A device port to the device to be read.
21 <p>
22 <dt> <var>queue</var>
23 <dd>
24 [in io_done queue send right] The port returned from
25 io_done_queue_create.
26 <p>
27 <dt> <var>request_id</var>
28 <dd>
29 [in send right] An unique request identifier that will be passed back as
30 part of the io_done_result structure.
31 <p>
32 <dt> <var>mode</var>
33 <dd>
34 [in scalar] I/O mode value. Meaningful options are:
35 <p>
36 <dl>
37 <dt> <strong>D_NOWAIT</strong>
38 <dd>
39 Do not wait if data is unavailable.
40 </dl>
41 <p>
42 <dt> <var>recnum</var>
43 <dd>
44 [in scalar] Record number to be read.
45 <p>
46 <dt> <var>bytes_wanted</var>
47 <dd>
48 [in scalar] Size of data transfer.
49 </dl>
50 <h3>DESCRIPTION</h3>
51 <p>
52 The <strong>device_read_async</strong> interface enqueues a read operation for a
53 sequence of bytes from a device object. The meaning of recnum as well
54 as the specific operation performed is device dependent.
55 <h3>RETURN VALUES</h3>
56 <dl>
57 <strong>device_read_async</strong> returns only invalid parameter errors.
58 <dd>
59 </dl>
60 <h3>RELATED INFORMATION</h3>
61 <p>
62 Functions:
63 <a href="device_read_async_inband.html"><strong>device_read_async_inband</strong></a>,
64 <a href="DR_overwrite_async.html"><strong>device_read_overwrite_async</strong></a>,
65 <a href="device_write_async.html"><strong>device_write_async</strong></a>,
66 <a href="device_write_async_inband.html"><strong>device_write_async_inband</strong></a>,
67 <a href="io_done_queue_create.html"><strong>io_done_queue_create</strong></a>.