]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/mach_task_self.html
xnu-1504.3.12.tar.gz
[apple/xnu.git] / osfmk / man / mach_task_self.html
CommitLineData
13fec989
A
1<h2>mach_task_self</h2>
2<hr>
3<p>
4<strong>System Trap</strong> - Return a send right to the caller's task_self port.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>#include&ltmach/mach_traps.h&gt</strong>
8
9<strong>mach_port_t mach_task_self (void)</strong>
10</pre>
11<h3>PARAMETERS</h3>
12<p>
13None.
14<h3>DESCRIPTION</h3>
15<p>
16The <strong>mach_task_self</strong> function returns send rights to
17the task's kernel port.
18<h3>NOTES</h3>
19<p>
20This function call is redefined in the <strong>mach_init.h</strong> file
21to return the caller's <strong>mach_task_self_</strong> environment variable,
22which is cached on behalf of the caller's task at runtime.
23(The <strong>mach_init.h</strong> file is itself included via the
24<strong>mach.h</strong> file.
25<h3>RETURN VALUES</h3>
26<p>
27Only generic errors apply.
28<h3>RELATED INFORMATION</h3>
29<p>
30Functions:
31<a href="task_set_special_port.html"><strong>task_set_special_port</strong></a>.