]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/mach_ports_lookup.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / mach_ports_lookup.html
CommitLineData
13fec989
A
1<h2>mach_ports_lookup</h2>
2<hr>
3<p>
4<strong>Function</strong> - Provide caller with an array of the target task's well-known ports.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t mach_ports_lookup</strong>
8 <strong>(task_t</strong> <var>target_task</var>,
9 <strong>mach_port_array_t</strong> <var>init_port_set</var>,
10 <strong>mach_msg_type_number_t</strong> <var>init_port_count</var><strong>);</strong>
11</pre>
12<h3>PARAMETERS</h3>
13<dl>
14<p>
15<dt> <var>target_task</var>
16<dd>
17[in task send right]
18The task whose currently registered ports are to be
19returned.
20<p>
21<dt> <var>init_port_set</var>
22<dd>
23[out pointer to dynamic array of registered send rights]
24The returned
25array of ports.
26<p>
27<dt> <var>init_port_count</var>
28<dd>
29[out scalar]
30The number of returned port rights.
31</dl>
32<h3>DESCRIPTION</h3>
33<p>
34The <strong>mach_ports_lookup</strong> function returns an array of
35the well-known system
36ports that are currently registered for the specified task.
37Note that the task holds
38only send rights for the ports.
39<p>
40Registered ports are those ports that are used by the run-time
41system to initialize a task. To register system ports for a task,
42use the <strong>mach_ports_register</strong> function.
43<h3>RETURN VALUES</h3>
44<p>
45Only generic errors apply.
46<h3>RELATED INFORMATION</h3>
47<p>
48Functions:
49<a href="mach_ports_register.html"><strong>mach_ports_register</strong></a>.