]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/exc_server.html
9d1c2a4e3b29a5153f7b4b915e815c10f5d9d5a3
[apple/xnu.git] / osfmk / man / exc_server.html
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]
17 The exception message received from the
18 kernel.
19 <p>
20 <dt> <var>out_msg</var>
21 <dd>
22 [out structure]
23 A reply message.
24 </dl>
25 <h3>DESCRIPTION</h3>
26 <p>
27 The <strong>exc_server</strong> function is the MIG generated server
28 handling function to
29 handle messages from the kernel relating to the occurrence of
30 an exception in a
31 thread. Such messages are delivered to the exception port set via
32 <strong>thread_set_exception_ports</strong> or <strong>task_set_exception_ports</strong>.
33 When an exception occurs in a
34 thread, the thread sends an exception message to its exception port, blocking in
35 the kernel waiting for the receipt of a reply. The <strong>exc_server</strong>
36 function performs
37 all 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
40 exception. If the called routine
41 returns <strong>KERN_SUCCESS</strong>, a reply message will be sent, allowing
42 the thread to
43 continue from the point of the exception; otherwise, no reply message is sent
44 and 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>
50 The message was handled and the appropriate function was called.
51 <p>
52 <dt> <strong>FALSE</strong>
53 <dd>
54 The message did not apply to the exception mechanism and no other
55 action was taken.
56 </dl>
57 <h3>RELATED INFORMATION</h3>
58 <p>
59 Functions:
60 <a href="catch_exception_raise.html"><strong>catch_exception_raise<strong></a>.