1*e13b1fa5SApple OSS Distributions<h2>io_done_queue_wait</h2>
2*e13b1fa5SApple OSS Distributions<hr>
3*e13b1fa5SApple OSS Distributions<p>
4*e13b1fa5SApple OSS Distributions<strong>System Trap</strong> - Wait on an io_done_queue kernel object.
5*e13b1fa5SApple OSS Distributions<h3>SYNOPSIS</h3>
6*e13b1fa5SApple OSS Distributions<pre>
7*e13b1fa5SApple OSS Distributions<strong>kern_return_t	io_done_queue_wait</strong>
8*e13b1fa5SApple OSS Distributions		<strong>(mach_port_t</strong>             <var>queue</var>,
9*e13b1fa5SApple OSS Distributions		<strong>io_done_result_t</strong>       <var>*result</var><strong>);</strong>
10*e13b1fa5SApple OSS Distributions</pre>
11*e13b1fa5SApple OSS Distributions<h3>PARAMETERS</h3>
12*e13b1fa5SApple OSS Distributions<dl>
13*e13b1fa5SApple OSS Distributions<p>
14*e13b1fa5SApple OSS Distributions<dt> <var>queue</var>
15*e13b1fa5SApple OSS Distributions<dd>
16*e13b1fa5SApple OSS Distributions[in io-done-queue send right] The port referencing the io_done_queue
17*e13b1fa5SApple OSS Distributionsto be destroyed.
18*e13b1fa5SApple OSS Distributions<p>
19*e13b1fa5SApple OSS Distributions<dt> <var>result</var>
20*e13b1fa5SApple OSS Distributions<dd>
21*e13b1fa5SApple OSS Distributions[out structure] The data structure to be filled in with the completion
22*e13b1fa5SApple OSS Distributionsstatus of the I/O operation.
23*e13b1fa5SApple OSS Distributions</dl>
24*e13b1fa5SApple OSS Distributions<h3>DESCRIPTION</h3>
25*e13b1fa5SApple OSS Distributions<p>
26*e13b1fa5SApple OSS DistributionsThe <strong>io_done_queue_wait</strong> interface is called to obtain the results of a
27*e13b1fa5SApple OSS Distributionspreviously requested asynchronous I/O operation. For each
28*e13b1fa5SApple OSS Distributions<strong>io_done_queue_wait</strong> invocation, the status of one I/O request is
29*e13b1fa5SApple OSS Distributionsreturned. If there are no pending I/O completions, io_done_queue_wait
30*e13b1fa5SApple OSS Distributionsblocks in the kernel on the address of the completion queue. The
31*e13b1fa5SApple OSS DistributionsmKernel, from interrupt context, enqueues (in FIFO order) completions
32*e13b1fa5SApple OSS Distributions(struct <strong>io_done_result</strong>'s) on the completion queue and posts a wakeup
33*e13b1fa5SApple OSS Distributionson the queue for each I/O completion. Completion processing previously
34*e13b1fa5SApple OSS Distributionsdone by the mKernel <strong>io_done thread</strong> is now done by the task thread when
35*e13b1fa5SApple OSS Distributionsit awakens.
36*e13b1fa5SApple OSS Distributions<h3>RETURN VALUES</h3>
37*e13b1fa5SApple OSS Distributions<dl>
38*e13b1fa5SApple OSS Distributions  <dt> <strong>KERN_TERMINATED</strong>
39*e13b1fa5SApple OSS Distributions<dd>
40*e13b1fa5SApple OSS Distributions     Stale <strong>io_done_queue</strong> handle.
41*e13b1fa5SApple OSS Distributions     <p>
42*e13b1fa5SApple OSS Distributions
43*e13b1fa5SApple OSS Distributions  <dt> <strong>KERN_INVALID_ARGUMENT</strong>
44*e13b1fa5SApple OSS Distributions<dd>
45*e13b1fa5SApple OSS Distributions     Invalid <var>queue</var> parameter.
46*e13b1fa5SApple OSS Distributions     <p>
47*e13b1fa5SApple OSS Distributions<dt> <strong>KERN_INVALID_ARGUMENT</strong>
48*e13b1fa5SApple OSS Distributions<dd>
49*e13b1fa5SApple OSS Distributions     The <var>result</var> parameter is a bad address.
50*e13b1fa5SApple OSS Distributions     <p>
51*e13b1fa5SApple OSS Distributions</dl>
52*e13b1fa5SApple OSS Distributions<h3>RELATED INFORMATION</h3>
53*e13b1fa5SApple OSS Distributions<p>
54*e13b1fa5SApple OSS DistributionsFunctions:
55*e13b1fa5SApple OSS Distributions<a href="io_done_queue_create.html"><strong>io_done_queue_create</strong></a>,
56*e13b1fa5SApple OSS Distributions<a href="io_done_queue_wait.html"><strong>io_done_queue_wait</strong></a>,
57*e13b1fa5SApple OSS Distributions<a href="device_read_async.html"><strong>device_read_async</strong></a>,
58*e13b1fa5SApple OSS Distributions<a href="device_read_async_inband.html"><strong>device_read_async_inband</strong></a>,
59*e13b1fa5SApple OSS Distributions<a href="DR_overwrite_async.html"><strong>device_read_overwrite_async</strong></a>,
60*e13b1fa5SApple OSS Distributions<a href="device_write_async.html"><strong>device_write_async</strong></a>,
61*e13b1fa5SApple OSS Distributions<a href="device_write_async_inband.html"><strong>device_write_async_inband</strong></a>.
62