]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/mach_task_self.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / mach_task_self.html
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>
13 None.
14 <h3>DESCRIPTION</h3>
15 <p>
16 The <strong>mach_task_self</strong> function returns send rights to
17 the task's kernel port.
18 <h3>NOTES</h3>
19 <p>
20 This function call is redefined in the <strong>mach_init.h</strong> file
21 to return the caller's <strong>mach_task_self_</strong> environment variable,
22 which 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>
27 Only generic errors apply.
28 <h3>RELATED INFORMATION</h3>
29 <p>
30 Functions:
31 <a href="task_set_special_port.html"><strong>task_set_special_port</strong></a>.