Skip to content

apple add task_create/task_terminate #2826

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 15, 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
4 changes: 4 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1997,6 +1997,10 @@ sysdir_get_next_search_path_enumeration
sysdir_search_path_directory_t
sysdir_search_path_domain_mask_t
sysdir_start_search_path_enumeration
task_create
task_for_pid
task_info
task_terminate
telldir
thread_basic_info_t
thread_extended_info_t
Expand Down
11 changes: 11 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ pub type memory_object_offset_t = ::c_ulonglong;
pub type vm_inherit_t = ::c_uint;
pub type vm_prot_t = ::c_int;

pub type ledger_t = ::mach_port_t;
pub type ledger_array_t = *mut ::ledger_t;

pub type iconv_t = *mut ::c_void;

pub type processor_cpu_load_info_t = *mut processor_cpu_load_info;
Expand Down Expand Up @@ -5498,6 +5501,14 @@ extern "C" {
task_info_out: task_info_t,
task_info_count: *mut mach_msg_type_number_t,
) -> ::kern_return_t;
pub fn task_create(
target_task: ::task_t,
ledgers: ::ledger_array_t,
ledgersCnt: ::mach_msg_type_number_t,
inherit_memory: ::boolean_t,
child_task: *mut ::task_t,
) -> ::kern_return_t;
pub fn task_terminate(target_task: ::task_t) -> ::kern_return_t;
pub fn host_statistics(
host_priv: host_t,
flavor: host_flavor_t,
Expand Down