forked from apple/darwin-xnu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexc_server.html
60 lines (60 loc) · 1.93 KB
/
exc_server.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<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>.