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