Skip to content

task_threads addition for macOs #2827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,9 @@ sysdir_start_search_path_enumeration
task_create
task_for_pid
task_info
task_inspect_t
task_terminate
task_threads
telldir
thread_basic_info_t
thread_extended_info_t
Expand Down
8 changes: 8 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ pub type host_info64_t = *mut integer_t;
pub type processor_flavor_t = ::c_int;
pub type thread_flavor_t = natural_t;
pub type thread_inspect_t = ::mach_port_t;
pub type thread_act_t = ::mach_port_t;
pub type thread_act_array_t = *mut ::thread_act_t;
pub type policy_t = ::c_int;
pub type mach_vm_address_t = u64;
pub type mach_vm_offset_t = u64;
Expand Down Expand Up @@ -124,6 +126,7 @@ pub type vm_statistics64_t = *mut vm_statistics64;
pub type vm_statistics64_data_t = vm_statistics64;

pub type task_t = ::mach_port_t;
pub type task_inspect_t = ::mach_port_t;

pub type sysdir_search_path_enumeration_state = ::c_uint;

Expand Down Expand Up @@ -5509,6 +5512,11 @@ extern "C" {
child_task: *mut ::task_t,
) -> ::kern_return_t;
pub fn task_terminate(target_task: ::task_t) -> ::kern_return_t;
pub fn task_threads(
target_task: ::task_inspect_t,
act_list: *mut ::thread_act_array_t,
act_listCnt: *mut ::mach_msg_type_number_t,
) -> ::kern_return_t;
pub fn host_statistics(
host_priv: host_t,
flavor: host_flavor_t,
Expand Down