exc_server.html   [plain text]

<strong>Function</strong> - Handle kernel-reported thread exception.
<strong>boolean_t	exc_server</strong>
		<strong>(mach_msg_header_t</strong>	<var>request_msg</var>,
		<strong>mach_msg_header_t</strong>	<var>reply_ms</var><strong>);</strong>
<dt> <var>in_msg</var> 
[pointer to in structure]
The exception message received from the
<dt> <var>out_msg</var> 
[out structure]
A reply message. 
The <strong>exc_server</strong> function is the MIG generated server
handling function to
handle messages from the kernel relating to the occurrence of
an exception in a 
thread.  Such messages are delivered to the exception port set via
<strong>thread_set_exception_ports</strong> or <strong>task_set_exception_ports</strong>.  
When an exception occurs in a 
thread, the thread sends an exception message to its exception port, blocking in 
the kernel waiting for the receipt of a reply.  The <strong>exc_server</strong>
function performs 
all necessary argument handling for this kernel message and calls
<strong>catch_exception_raise</strong>, <strong>catch_exception_raise_state</strong> or
<strong>catch_exception_raise_state_identity</strong>, which should handle the
exception.  If the called routine 
returns <strong>KERN_SUCCESS</strong>, a reply message will be sent, allowing
the thread to 
continue from the point of the exception; otherwise, no reply message is sent 
and the called routine must have dealt with the exception thread directly.
<dt> <strong>TRUE</strong>
The message was handled and the appropriate function was called.
<dt> <strong>FALSE</strong>
The message did not apply to the exception mechanism and no other 
action was taken.
<a href="catch_exception_raise.html"><strong>catch_exception_raise<strong></a>.