exc_server.html   [plain text]


<h2>exc_server</h2>
<hr>
<p>
<strong>Function</strong> - Handle kernel-reported thread exception.
<h3>SYNOPSIS</h3>
<pre>
<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>
</pre>
<h3>PARAMETERS</h3>
<dl>
<p>
<dt> <var>in_msg</var> 
<dd>
[pointer to in structure]
The exception message received from the
kernel.
<p>
<dt> <var>out_msg</var> 
<dd>
[out structure]
A reply message. 
</dl>
<h3>DESCRIPTION</h3>
<p>
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.
<h3>RETURN VALUES</h3>
<dl>
<p>
<dt> <strong>TRUE</strong>
<dd>
The message was handled and the appropriate function was called.
<p>
<dt> <strong>FALSE</strong>
<dd>
The message did not apply to the exception mechanism and no other 
action was taken.
</dl>
<h3>RELATED INFORMATION</h3>
<p>
Functions:
<a href="catch_exception_raise.html"><strong>catch_exception_raise<strong></a>.