Skip to content

Commit 3a328b7

Browse files
committed
task_threads addition for macOs
1 parent 6b6a6a7 commit 3a328b7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,9 @@ sysdir_start_search_path_enumeration
20002000
task_create
20012001
task_for_pid
20022002
task_info
2003+
task_inspect_t
20032004
task_terminate
2005+
task_threads
20042006
telldir
20052007
thread_basic_info_t
20062008
thread_extended_info_t

src/unix/bsd/apple/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ pub type host_info64_t = *mut integer_t;
5353
pub type processor_flavor_t = ::c_int;
5454
pub type thread_flavor_t = natural_t;
5555
pub type thread_inspect_t = ::mach_port_t;
56+
pub type thread_act_t = ::mach_port_t;
57+
pub type thread_act_array_t = *mut ::thread_act_t;
5658
pub type policy_t = ::c_int;
5759
pub type mach_vm_address_t = u64;
5860
pub type mach_vm_offset_t = u64;
@@ -124,6 +126,7 @@ pub type vm_statistics64_t = *mut vm_statistics64;
124126
pub type vm_statistics64_data_t = vm_statistics64;
125127

126128
pub type task_t = ::mach_port_t;
129+
pub type task_inspect_t = ::mach_port_t;
127130

128131
pub type sysdir_search_path_enumeration_state = ::c_uint;
129132

@@ -5509,6 +5512,11 @@ extern "C" {
55095512
child_task: *mut ::task_t,
55105513
) -> ::kern_return_t;
55115514
pub fn task_terminate(target_task: ::task_t) -> ::kern_return_t;
5515+
pub fn task_threads(
5516+
target_task: ::task_inspect_t,
5517+
act_list: *mut ::thread_act_array_t,
5518+
act_listCnt: *mut ::mach_msg_type_number_t,
5519+
) -> ::kern_return_t;
55125520
pub fn host_statistics(
55135521
host_priv: host_t,
55145522
flavor: host_flavor_t,

0 commit comments

Comments
 (0)