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