Skip to content
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

Extend OS X/Darwin System Calls #8

Open
aembke opened this issue Mar 13, 2017 · 0 comments
Open

Extend OS X/Darwin System Calls #8

aembke opened this issue Mar 13, 2017 · 0 comments

Comments

@aembke
Copy link
Contributor

aembke commented Mar 13, 2017

It looks like the mach crate currently does not implement the task_info function required to read per-thread CPU and memory information. Until that's updated this module will not be able to handle StatType::Thread on OS X/Darwin. For processes and children POSIX calls seem to work, but for threads Darwin requires using the mach kernel interface.

More info:

TODO:

  • Deal with sizing macros for TASK_BASIC_INFO_COUNT, TASK_EVENTS_INFO_COUNT, and TASK_THREAD_TIMES_INFO_COUNT.
  • Implement the new task structs: task_basic_info, task_basic_info_t, task_events_info, task_events_info_t, task_thread_times_info, task_thread_times_info_t, time_value, time_value_t.
  • Implement task_info: pub fn task_info(target_task: task_t, flavor: c_int, task_info: *mut task_info_t, task_info_count: *mut mach_msg_type_number_t) -> kern_return_t;
@aembke aembke changed the title Extend OSX/Darwin System Calls Extend OS X/Darwin System Calls Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant