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