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