Back to Darwin Xnu

Thread Set Special Port

osfmk/man/thread_set_special_port.html

latest1.3 KB
Original Source

thread_set_special_port


Function - Set caller-specified special port belonging to the target thread.

SYNOPSIS

**kern\_return\_t thread\_set\_special\_port**** (thread\_act\_t **thread,** int **which\_port,** mach\_port\_t **special\_port** );**

Macro form:

**kern\_return\_t thread\_set\_kernel\_port**** (thread\_act\_t **thread,** mach\_port\_t **special\_port** );**

PARAMETERS

thread[in thread send right] The thread for which to set the port.

which_port[in scalar] The special port to be set. Valid values are:

THREAD_KERNEL_PORT [thread-self port] The thread's kernel port. Used by the kernel to receive messages from the thread. This is the movable port for the thread and different from mach_thread_self (immovable).

special_port[in thread-special send right] The value for the port.

DESCRIPTION

The thread_set_special_port function sets a special port belonging to thread.

RETURN VALUES

Only generic errors apply.

Functions: mach_thread_self, task_get_special_port, task_set_special_port, thread_create, thread_get_special_port.