]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/exc_server.html
xnu-792.6.70.tar.gz
[apple/xnu.git] / osfmk / man / exc_server.html
CommitLineData
9bccf70c 1<h2>exc_server</h2>\r<hr>\r<p>\r<strong>Function</strong> - Handle kernel-reported thread exception.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>boolean_t exc_server</strong>\r <strong>(mach_msg_header_t</strong> <var>request_msg</var>,\r <strong>mach_msg_header_t</strong> <var>reply_ms</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>in_msg</var> \r<dd>\r[pointer to in structure]\rThe exception message received from the\rkernel.\r<p>\r<dt> <var>out_msg</var> \r<dd>\r[out structure]\rA reply message. \r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>exc_server</strong> function is the MIG generated server\rhandling function to\rhandle messages from the kernel relating to the occurrence of\ran exception in a \rthread. Such messages are delivered to the exception port set via\r<strong>thread_set_exception_ports</strong> or <strong>task_set_exception_ports</strong>. \rWhen an exception occurs in a \rthread, the thread sends an exception message to its exception port, blocking in \rthe kernel waiting for the receipt of a reply. The <strong>exc_server</strong>\rfunction performs \rall necessary argument handling for this kernel message and calls\r<strong>catch_exception_raise</strong>, <strong>catch_exception_raise_state</strong> or\r<strong>catch_exception_raise_state_identity</strong>, which should handle the\rexception. If the called routine \rreturns <strong>KERN_SUCCESS</strong>, a reply message will be sent, allowing\rthe thread to \rcontinue from the point of the exception; otherwise, no reply message is sent \rand the called routine must have dealt with the exception thread directly.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>TRUE</strong>\r<dd>\rThe message was handled and the appropriate function was called.\r<p>\r<dt> <strong>FALSE</strong>\r<dd>\rThe message did not apply to the exception mechanism and no other \raction was taken.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="catch_exception_raise.html"><strong>catch_exception_raise<strong></a>.\r