]> git.saurik.com Git - apple/xnu.git/blame_incremental - osfmk/man/exc_server.html
xnu-792.6.76.tar.gz
[apple/xnu.git] / osfmk / man / exc_server.html
... / ...
CommitLineData
1<h2>exc_server</h2>
2<hr>
3<p>
4<strong>Function</strong> - Handle kernel-reported thread exception.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>boolean_t exc_server</strong>
8 <strong>(mach_msg_header_t</strong> <var>request_msg</var>,
9 <strong>mach_msg_header_t</strong> <var>reply_ms</var><strong>);</strong>
10</pre>
11<h3>PARAMETERS</h3>
12<dl>
13<p>
14<dt> <var>in_msg</var>
15<dd>
16[pointer to in structure]
17The exception message received from the
18kernel.
19<p>
20<dt> <var>out_msg</var>
21<dd>
22[out structure]
23A reply message.
24</dl>
25<h3>DESCRIPTION</h3>
26<p>
27The <strong>exc_server</strong> function is the MIG generated server
28handling function to
29handle messages from the kernel relating to the occurrence of
30an exception in a
31thread. Such messages are delivered to the exception port set via
32<strong>thread_set_exception_ports</strong> or <strong>task_set_exception_ports</strong>.
33When an exception occurs in a
34thread, the thread sends an exception message to its exception port, blocking in
35the kernel waiting for the receipt of a reply. The <strong>exc_server</strong>
36function performs
37all necessary argument handling for this kernel message and calls
38<strong>catch_exception_raise</strong>, <strong>catch_exception_raise_state</strong> or
39<strong>catch_exception_raise_state_identity</strong>, which should handle the
40exception. If the called routine
41returns <strong>KERN_SUCCESS</strong>, a reply message will be sent, allowing
42the thread to
43continue from the point of the exception; otherwise, no reply message is sent
44and the called routine must have dealt with the exception thread directly.
45<h3>RETURN VALUES</h3>
46<dl>
47<p>
48<dt> <strong>TRUE</strong>
49<dd>
50The message was handled and the appropriate function was called.
51<p>
52<dt> <strong>FALSE</strong>
53<dd>
54The message did not apply to the exception mechanism and no other
55action was taken.
56</dl>
57<h3>RELATED INFORMATION</h3>
58<p>
59Functions:
60<a href="catch_exception_raise.html"><strong>catch_exception_raise<strong></a>.