Go to the first, previous, next, last section, table of contents.
task_get_special_port
returns send rights to one of
a set of special ports for the task specified by task.
The special ports associated with a task are the kernel port
(TASK_KERNEL_PORT
), the bootstrap port
(TASK_BOOTSTRAP_PORT
) and the exception port
(TASK_EXCEPTION_PORT
). The bootstrap port is a port to which a
The bootstrap port is a port to which a thread may send a message
requesting other system service ports. This port is not used by the
kernel. The task's exception port is the port to which messages are
sent by the kernel when an exception occurs and the thread causing the
exception has no exception port of its own.
The following macros to call task_get_special_port
for a specific
port are defined in mach/task_special_ports.h
:
task_get_exception_port
and task_get_bootstrap_port
.
The function returns KERN_SUCCESS
if the port was returned and
KERN_INVALID_ARGUMENT
if task is not a task or
which_port is an invalid port selector.
task_get_kernel_port
is equivalent to the function
task_get_special_port
with the which_port argument set to
TASK_KERNEL_PORT
.
task_get_exception_port
is equivalent to the
function task_get_special_port
with the which_port argument
set to TASK_EXCEPTION_PORT
.
task_get_bootstrap_port
is equivalent to the
function task_get_special_port
with the which_port argument
set to TASK_BOOTSTRAP_PORT
.
thread_set_special_port
sets one of a set of special
ports for the task specified by task.
The special ports associated with a task are the kernel port
(TASK_KERNEL_PORT
), the bootstrap port
(TASK_BOOTSTRAP_PORT
) and the exception port
(TASK_EXCEPTION_PORT
). The bootstrap port is a port to which a
thread may send a message requesting other system service ports. This
port is not used by the kernel. The task's exception port is the port
to which messages are sent by the kernel when an exception occurs and
the thread causing the exception has no exception port of its own.
The function returns KERN_SUCCESS
if the port was set and
KERN_INVALID_ARGUMENT
if task is not a task or
which_port is an invalid port selector.
task_set_kernel_port
is equivalent to the function
task_set_special_port
with the which_port argument set to
TASK_KERNEL_PORT
.
task_set_exception_port
is equivalent to the
function task_set_special_port
with the which_port argument
set to TASK_EXCEPTION_PORT
.
task_set_bootstrap_port
is equivalent to the
function task_set_special_port
with the which_port argument
set to TASK_BOOTSTRAP_PORT
.
Go to the first, previous, next, last section, table of contents.