diff --git a/Cargo.toml b/Cargo.toml index 04183f0c2623a..b0eacb4cdaa94 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -107,7 +107,6 @@ targets = [ "thumbv7neon-unknown-linux-gnueabihf", "wasm32-unknown-emscripten", "wasm32-unknown-unknown", - "wasm32-wasi", "x86_64-apple-darwin", "x86_64-apple-ios", "x86_64-fortanix-unknown-sgx", diff --git a/ci/build.sh b/ci/build.sh index d4b85ccbf0bd9..28655238e9f65 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -136,7 +136,6 @@ armv5te-unknown-linux-gnueabi \ armv5te-unknown-linux-musleabi \ i686-pc-windows-gnu \ riscv64gc-unknown-linux-gnu \ -wasm32-wasi \ x86_64-fortanix-unknown-sgx \ x86_64-unknown-fuchsia \ x86_64-pc-solaris \ diff --git a/libc-test/build.rs b/libc-test/build.rs index b86d9516b8744..750b3869205e9 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3864,6 +3864,9 @@ fn test_linux(target: &str) { // kernel so we can drop this and test the type once this new version is used in CI. "sched_attr" => true, + // FIXME: Requires >= 6.9 kernel headers. + "epoll_params" => true, + _ => false, } }); @@ -4306,6 +4309,10 @@ fn test_linux(target: &str) { | "SCHED_FLAG_UTIL_CLAMP" | "SCHED_FLAG_ALL" if musl => true, // Needs more recent linux headers. + // FIXME: Requires >= 6.9 kernel headers. + "EPIOCSPARAMS" + | "EPIOCGPARAMS" => true, + _ => false, } }); diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index 11f26658c2a47..e5de0f02136af 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -1983,6 +1983,9 @@ getxattr glob glob_t globfree +host_cpu_load_info +host_cpu_load_info_data_t +host_cpu_load_info_t iconv iconv_close iconv_open diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index a5ccef469541d..6c10f1234226b 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -550,6 +550,8 @@ ENOTSUP ENOTUNIQ EOF EOWNERDEAD +EPIOCGPARAMS +EPIOCSPARAMS EPOLLERR EPOLLET EPOLLEXCLUSIVE @@ -3489,6 +3491,7 @@ epoll_create epoll_create1 epoll_ctl epoll_event +epoll_params epoll_pwait epoll_wait erand48 diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 0017403410f4c..8f882f9b6954d 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -72,6 +72,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; @@ -1189,6 +1194,11 @@ s! { pub tcpi_rxoutoforderbytes: u64, pub tcpi_rxretransmitpackets: u64, } + + // mach/host_info.h + pub struct host_cpu_load_info { + pub cpu_ticks: [::natural_t; CPU_STATE_MAX as usize], + } } s_no_extra_traits! { diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 20c4a16979087..f26af4c1fe16f 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -880,6 +880,15 @@ s! { pub salt: [::c_uchar; TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE], pub rec_seq: [::c_uchar; TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE], } + + // #include + + pub struct epoll_params { + pub busy_poll_usecs: u32, + pub busy_poll_budget: u16, + pub prefer_busy_poll: u8, + pub __pad: u8, // Must be zero + } } s_no_extra_traits! { @@ -4936,6 +4945,10 @@ pub const SCHED_FLAG_ALL: ::c_int = SCHED_FLAG_RESET_ON_FORK | SCHED_FLAG_KEEP_ALL | SCHED_FLAG_UTIL_CLAMP; +// ioctl_eventpoll: added in Linux 6.9 +pub const EPIOCSPARAMS: ::Ioctl = 0x40088a01; +pub const EPIOCGPARAMS: ::Ioctl = 0x80088a02; + f! { pub fn NLA_ALIGN(len: ::c_int) -> ::c_int { return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)