Skip to content

darwin libproc Big Sur update. #2472

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
Oct 23, 2021
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
7 changes: 7 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,9 @@ PRIO_DARWIN_BG
PRIO_DARWIN_NONUI
PRIO_DARWIN_PROCESS
PRIO_DARWIN_THREAD
PROC_CSM_ALL
PROC_CSM_NOSMT
PROC_CSM_TECS
PROC_PIDTASKALLINFO
PROC_PIDTASKINFO
PROC_PIDTHREADINFO
Expand Down Expand Up @@ -1818,6 +1821,10 @@ proc_pidfdinfo
proc_pidfileportinfo
proc_pidpath
proc_regionfilename
proc_set_no_smt
proc_setthread_no_smt
proc_set_csm
proc_setthread_csm
proc_taskallinfo
proc_taskinfo
proc_threadinfo
Expand Down
9 changes: 9 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4302,6 +4302,9 @@ pub const PROC_PIDTASKINFO: ::c_int = 4;
pub const PROC_PIDTHREADINFO: ::c_int = 5;
pub const PROC_PIDVNODEPATHINFO: ::c_int = 9;
pub const PROC_PIDPATHINFO_MAXSIZE: ::c_int = 4096;
pub const PROC_CSM_ALL: ::c_uint = 0x0001;
pub const PROC_CSM_NOSMT: ::c_uint = 0x0002;
pub const PROC_CSM_TECS: ::c_uint = 0x0004;
pub const MAXCOMLEN: usize = 16;
pub const MAXTHREADNAMESIZE: usize = 64;

Expand Down Expand Up @@ -5249,6 +5252,12 @@ extern "C" {
pub fn proc_kmsgbuf(buffer: *mut ::c_void, buffersize: u32) -> ::c_int;
pub fn proc_libversion(major: *mut ::c_int, mintor: *mut ::c_int) -> ::c_int;
pub fn proc_pid_rusage(pid: ::c_int, flavor: ::c_int, buffer: *mut rusage_info_t) -> ::c_int;

// Available from Big Sur
pub fn proc_set_no_smt() -> ::c_int;
pub fn proc_setthread_no_smt() -> ::c_int;
pub fn proc_set_csm(flags: u32) -> ::c_int;
pub fn proc_setthread_csm(flags: u32) -> ::c_int;
/// # Notes
///
/// `id` is of type [`uuid_t`].
Expand Down