1use crate::exception_types::{exception_behavior_t, exception_mask_t};
4use crate::kern_return::kern_return_t;
5use crate::mach_types::{thread_act_t, thread_port_t};
6use crate::message::mach_msg_type_number_t;
7use crate::port::mach_port_t;
8use crate::thread_status::{thread_state_flavor_t, thread_state_t};
9
10extern "C" {
11 pub fn thread_get_state(
12 target_act: thread_act_t,
13 flavor: thread_state_flavor_t,
14 new_state: thread_state_t,
15 new_state_count: *mut mach_msg_type_number_t,
16 ) -> kern_return_t;
17
18 pub fn thread_set_state(
19 target_act: thread_port_t,
20 flavor: thread_state_flavor_t,
21 new_state: thread_state_t,
22 new_stateCnt: mach_msg_type_number_t,
23 ) -> kern_return_t;
24
25 pub fn thread_set_exception_ports(
26 thread: thread_port_t,
27 exception_mask: exception_mask_t,
28 new_port: mach_port_t,
29 behavior: exception_behavior_t,
30 new_flavor: thread_state_flavor_t,
31 ) -> kern_return_t;
32
33 pub fn thread_suspend(
34 target_act: thread_act_t,
35 ) -> kern_return_t;
36
37 pub fn thread_resume(
38 target_act: thread_act_t,
39 ) -> kern_return_t;
40}
41