mach_task_self.html   [plain text]


<h2>mach_task_self</h2>
<hr>
<p>
<strong>System Trap</strong> - Return a send right to the caller's task_self port.
<h3>SYNOPSIS</h3>
<pre>
<strong>#include&ltmach/mach_traps.h&gt</strong>

<strong>mach_port_t   mach_task_self (void)</strong>
</pre>
<h3>PARAMETERS</h3>
<p>
None.
<h3>DESCRIPTION</h3>
<p>
The <strong>mach_task_self</strong> function returns send rights to
the task's kernel port.
<h3>NOTES</h3>
<p>
This function call is redefined in the <strong>mach_init.h</strong> file
to return the caller's <strong>mach_task_self_</strong> environment variable,
which is cached on behalf of the caller's task at runtime.
(The <strong>mach_init.h</strong> file is itself included via the
<strong>mach.h</strong> file.
<h3>RETURN VALUES</h3>
<p>
Only generic errors apply.
<h3>RELATED INFORMATION</h3>
<p>
Functions:
<a href="task_set_special_port.html"><strong>task_set_special_port</strong></a>.