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