1 //! This module roughly corresponds to `mach/exc.h`.
2 
3 use exception_types::{exception_data_t, exception_type_t};
4 use kern_return::kern_return_t;
5 use message::mach_msg_type_number_t;
6 use port::mach_port_t;
7 use thread_status::thread_state_t;
8 
9 pub const exc_MSG_COUNT: ::libc::c_uint = 3;
10 
11 extern "C" {
exception_raise( exception_port: mach_port_t, thread: mach_port_t, task: mach_port_t, exception: exception_type_t, code: exception_data_t, codeCnt: mach_msg_type_number_t, ) -> kern_return_t12     pub fn exception_raise(
13         exception_port: mach_port_t,
14         thread: mach_port_t,
15         task: mach_port_t,
16         exception: exception_type_t,
17         code: exception_data_t,
18         codeCnt: mach_msg_type_number_t,
19     ) -> kern_return_t;
exception_raise_state( exception_port: mach_port_t, exception: exception_type_t, code: exception_data_t, codeCnt: mach_msg_type_number_t, flavor: *mut ::libc::c_int, old_state: thread_state_t, old_stateCnt: mach_msg_type_number_t, new_state: thread_state_t, new_stateCnt: *mut mach_msg_type_number_t, ) -> kern_return_t20     pub fn exception_raise_state(
21         exception_port: mach_port_t,
22         exception: exception_type_t,
23         code: exception_data_t,
24         codeCnt: mach_msg_type_number_t,
25         flavor: *mut ::libc::c_int,
26         old_state: thread_state_t,
27         old_stateCnt: mach_msg_type_number_t,
28         new_state: thread_state_t,
29         new_stateCnt: *mut mach_msg_type_number_t,
30     ) -> kern_return_t;
exception_raise_state_identity( exception_port: mach_port_t, thread: mach_port_t, task: mach_port_t, exception: exception_type_t, code: exception_data_t, codeCnt: mach_msg_type_number_t, flavor: *mut ::libc::c_int, old_state: thread_state_t, old_stateCnt: mach_msg_type_number_t, new_state: thread_state_t, new_stateCnt: *mut mach_msg_type_number_t, ) -> kern_return_t31     pub fn exception_raise_state_identity(
32         exception_port: mach_port_t,
33         thread: mach_port_t,
34         task: mach_port_t,
35         exception: exception_type_t,
36         code: exception_data_t,
37         codeCnt: mach_msg_type_number_t,
38         flavor: *mut ::libc::c_int,
39         old_state: thread_state_t,
40         old_stateCnt: mach_msg_type_number_t,
41         new_state: thread_state_t,
42         new_stateCnt: *mut mach_msg_type_number_t,
43     ) -> kern_return_t;
44 }
45