Back to Darwin Xnu

Mach Task Self

osfmk/man/mach_task_self.html

latest737 B
Original Source

mach_task_self


System Trap - Return a send right to the caller's task_self port.

SYNOPSIS

**#include&ltmach/mach\_traps.h&gt**** mach\_port\_t mach\_task\_self (void)**

PARAMETERS

None.

DESCRIPTION

The mach_task_self function returns send rights to the task's kernel port.

NOTES

This function call is redefined in the mach_init.h file to return the caller's mach_task_self_ environment variable, which is cached on behalf of the caller's task at runtime. (The mach_init.h file is itself included via the mach.h file.

RETURN VALUES

Only generic errors apply.

Functions: task_set_special_port.