X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..2a1bd2d3eef5c7a7bb14f4bb9fdbca9a96ee4752:/osfmk/man/thread_get_special_port.html diff --git a/osfmk/man/thread_get_special_port.html b/osfmk/man/thread_get_special_port.html old mode 100755 new mode 100644 index 2acf05b9c..f8e0abba6 --- a/osfmk/man/thread_get_special_port.html +++ b/osfmk/man/thread_get_special_port.html @@ -1 +1,76 @@ -

thread_get_special_port


Function - Return a send right to the caller-specified special port.

SYNOPSIS

kern_return_t   thread_get_special_port
                (thread_act_t                            thread,
                 int                                 which_port,
                 thread                            special_port);

Macro form:

kern_return_t   thread_get_kernel_port
                (thread_act_t                            thread,
                 thread                            special_port);

PARAMETERS

thread
[in thread send right] The thread for which to return the port's send right.

which_port
[in scalar] The special port for which the send right is requested. Valid values are:

THREAD_KERNEL_PORT
[thread-self send right] The port used to name the thread. Used to invoke operations that affect the thread. This is the port returned by mach_thread_self.

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

DESCRIPTION

The thread_get_special_port function returns a send right for a special port belonging to thread.

The thread kernel port is a port for which the kernel holds the receive right. The kernel uses this port to identify the thread.

If one thread has a send right for the kernel port of another thread, it can use the port to perform kernel operations for the other thread. Send rights for a kernel port normally are held only by the thread to which the port belongs, or by the task that contains the thread. Using the mach_msg function, however, any thread can pass a send right for its kernel port to another thread.

RETURN VALUES

Only generic errors apply.

RELATED INFORMATION

Functions: mach_thread_self, task_get_special_port, task_set_special_port, thread_create, thread_set_special_port. \ No newline at end of file +

thread_get_special_port

+
+

+Function - Return a send right to the caller-specified special port. +

SYNOPSIS

+
+kern_return_t   thread_get_special_port
+                (thread_act_t                            thread,
+                 int                                 which_port,
+                 thread                            special_port);
+
+ +

Macro form:

+ +
+kern_return_t   thread_get_kernel_port
+                (thread_act_t                            thread,
+                 thread                            special_port);
+
+

PARAMETERS

+
+

+

thread +
+[in thread send right] +The thread for which to return the port's send +right. +

+

which_port +
+[in scalar] +The special port for which the send right is requested. Valid +values are: +
+

+

THREAD_KERNEL_PORT +
+[thread-self send right] The port used to name the thread. +Used to invoke operations that affect the thread. This is the +port returned by mach_thread_self. +
+

+

special_port +
+[out thread-special send right] +The returned value for the port. +
+

DESCRIPTION

+

+The thread_get_special_port function returns a send +right for a special port +belonging to thread. +

+The thread kernel port is a port for which the kernel holds the +receive right. The +kernel uses this port to identify the thread. +

+If one thread has a send right for the kernel port of another +thread, it can use the +port to perform kernel operations for the other thread. Send +rights for a kernel +port normally are held only by the thread to which the port belongs, or by the +task that contains the thread. Using the mach_msg +function, however, any +thread can pass a send right for its kernel port to another thread. +

RETURN VALUES

+

+Only generic errors apply. +

RELATED INFORMATION

+

+Functions: +mach_thread_self, +task_get_special_port, +task_set_special_port, +thread_create, +thread_set_special_port.