-<h2>io_done_queue_wait</h2>\r<hr>\r<p>\r<strong>System Trap</strong> - Wait on an io_done_queue kernel object.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t io_done_queue_wait</strong>\r <strong>(mach_port_t</strong> <var>queue</var>,\r <strong>io_done_result_t</strong> <var>*result</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>queue</var>\r<dd>\r[in io-done-queue send right] The port referencing the io_done_queue \rto be destroyed.\r<p>\r<dt> <var>result</var>\r<dd>\r[out structure] The data structure to be filled in with the completion\rstatus of the I/O operation.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>io_done_queue_wait</strong> interface is called to obtain the results of a\rpreviously requested asynchronous I/O operation. For each\r<strong>io_done_queue_wait</strong> invocation, the status of one I/O request is\rreturned. If there are no pending I/O completions, io_done_queue_wait\rblocks in the kernel on the address of the completion queue. The\rmKernel, from interrupt context, enqueues (in FIFO order) completions\r(struct <strong>io_done_result</strong>'s) on the completion queue and posts a wakeup\ron the queue for each I/O completion. Completion processing previously\rdone by the mKernel <strong>io_done thread</strong> is now done by the task thread when\rit awakens.\r<h3>RETURN VALUES</h3>\r<dl>\r <dt> <strong>KERN_TERMINATED</strong>\r<dd>\r Stale <strong>io_done_queue</strong> handle.\r <p>\r\r <dt> <strong>KERN_INVALID_ARGUMENT</strong>\r<dd>\r Invalid <var>queue</var> parameter.\r <p>\r<dt> <strong>KERN_INVALID_ARGUMENT</strong>\r<dd>\r The <var>result</var> parameter is a bad address.\r <p>\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="io_done_queue_create.html"><strong>io_done_queue_create</strong></a>,\r<a href="io_done_queue_wait.html"><strong>io_done_queue_wait</strong></a>,\r<a href="device_read_async.html"><strong>device_read_async</strong></a>,\r<a href="device_read_async_inband.html"><strong>device_read_async_inband</strong></a>,\r<a href="DR_overwrite_async.html"><strong>device_read_overwrite_async</strong></a>,\r<a href="device_write_async.html"><strong>device_write_async</strong></a>,\r<a href="device_write_async_inband.html"><strong>device_write_async_inband</strong></a>.\r
\ No newline at end of file
+<h2>io_done_queue_wait</h2>
+<hr>
+<p>
+<strong>System Trap</strong> - Wait on an io_done_queue kernel object.
+<h3>SYNOPSIS</h3>
+<pre>
+<strong>kern_return_t io_done_queue_wait</strong>
+ <strong>(mach_port_t</strong> <var>queue</var>,
+ <strong>io_done_result_t</strong> <var>*result</var><strong>);</strong>
+</pre>
+<h3>PARAMETERS</h3>
+<dl>
+<p>
+<dt> <var>queue</var>
+<dd>
+[in io-done-queue send right] The port referencing the io_done_queue
+to be destroyed.
+<p>
+<dt> <var>result</var>
+<dd>
+[out structure] The data structure to be filled in with the completion
+status of the I/O operation.
+</dl>
+<h3>DESCRIPTION</h3>
+<p>
+The <strong>io_done_queue_wait</strong> interface is called to obtain the results of a
+previously requested asynchronous I/O operation. For each
+<strong>io_done_queue_wait</strong> invocation, the status of one I/O request is
+returned. If there are no pending I/O completions, io_done_queue_wait
+blocks in the kernel on the address of the completion queue. The
+mKernel, from interrupt context, enqueues (in FIFO order) completions
+(struct <strong>io_done_result</strong>'s) on the completion queue and posts a wakeup
+on the queue for each I/O completion. Completion processing previously
+done by the mKernel <strong>io_done thread</strong> is now done by the task thread when
+it awakens.
+<h3>RETURN VALUES</h3>
+<dl>
+ <dt> <strong>KERN_TERMINATED</strong>
+<dd>
+ Stale <strong>io_done_queue</strong> handle.
+ <p>
+
+ <dt> <strong>KERN_INVALID_ARGUMENT</strong>
+<dd>
+ Invalid <var>queue</var> parameter.
+ <p>
+<dt> <strong>KERN_INVALID_ARGUMENT</strong>
+<dd>
+ The <var>result</var> parameter is a bad address.
+ <p>
+</dl>
+<h3>RELATED INFORMATION</h3>
+<p>
+Functions:
+<a href="io_done_queue_create.html"><strong>io_done_queue_create</strong></a>,
+<a href="io_done_queue_wait.html"><strong>io_done_queue_wait</strong></a>,
+<a href="device_read_async.html"><strong>device_read_async</strong></a>,
+<a href="device_read_async_inband.html"><strong>device_read_async_inband</strong></a>,
+<a href="DR_overwrite_async.html"><strong>device_read_overwrite_async</strong></a>,
+<a href="device_write_async.html"><strong>device_write_async</strong></a>,
+<a href="device_write_async_inband.html"><strong>device_write_async_inband</strong></a>.