diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index 1fd6e03758a2d..9940593eab324 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -1890,6 +1890,9 @@ getxattr glob glob_t globfree +host_cpu_load_info +host_cpu_load_info_data_t +host_cpu_load_info_t icmp6_ifstat iconv_t id_t diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 2fce99ab5a1b1..b90e90136ebdb 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -74,6 +74,11 @@ pub type ledger_array_t = *mut ::ledger_t; pub type iconv_t = *mut ::c_void; +// mach/host_info.h +pub type host_cpu_load_info_t = *mut host_cpu_load_info; +pub type host_cpu_load_info_data_t = host_cpu_load_info; + +// mach/processor_info.h pub type processor_cpu_load_info_t = *mut processor_cpu_load_info; pub type processor_cpu_load_info_data_t = processor_cpu_load_info; pub type processor_basic_info_t = *mut processor_basic_info; @@ -1208,6 +1213,11 @@ s! { pub ifs6_out_mldreport: ::u_quad_t, pub ifs6_out_mlddone: ::u_quad_t, } + + // mach/host_info.h + pub struct host_cpu_load_info { + pub cpu_ticks: [::natural_t; CPU_STATE_MAX as usize], + } } s_no_extra_traits! {