Skip to content

Commit e009851

Browse files
authored
Merge pull request #4014 from tgross35/backport-swiss-chard
[0.2] Backports
2 parents f3d58c2 + f035b10 commit e009851

File tree

7 files changed

+36
-2
lines changed

7 files changed

+36
-2
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ targets = [
107107
"thumbv7neon-unknown-linux-gnueabihf",
108108
"wasm32-unknown-emscripten",
109109
"wasm32-unknown-unknown",
110-
"wasm32-wasi",
111110
"x86_64-apple-darwin",
112111
"x86_64-apple-ios",
113112
"x86_64-fortanix-unknown-sgx",

ci/build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ armv5te-unknown-linux-gnueabi \
136136
armv5te-unknown-linux-musleabi \
137137
i686-pc-windows-gnu \
138138
riscv64gc-unknown-linux-gnu \
139-
wasm32-wasi \
140139
x86_64-fortanix-unknown-sgx \
141140
x86_64-unknown-fuchsia \
142141
x86_64-pc-solaris \

libc-test/build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,6 +3864,9 @@ fn test_linux(target: &str) {
38643864
// kernel so we can drop this and test the type once this new version is used in CI.
38653865
"sched_attr" => true,
38663866

3867+
// FIXME: Requires >= 6.9 kernel headers.
3868+
"epoll_params" => true,
3869+
38673870
_ => false,
38683871
}
38693872
});
@@ -4306,6 +4309,10 @@ fn test_linux(target: &str) {
43064309
| "SCHED_FLAG_UTIL_CLAMP"
43074310
| "SCHED_FLAG_ALL" if musl => true, // Needs more recent linux headers.
43084311

4312+
// FIXME: Requires >= 6.9 kernel headers.
4313+
"EPIOCSPARAMS"
4314+
| "EPIOCGPARAMS" => true,
4315+
43094316
_ => false,
43104317
}
43114318
});

libc-test/semver/apple.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,6 +1983,9 @@ getxattr
19831983
glob
19841984
glob_t
19851985
globfree
1986+
host_cpu_load_info
1987+
host_cpu_load_info_data_t
1988+
host_cpu_load_info_t
19861989
iconv
19871990
iconv_close
19881991
iconv_open

libc-test/semver/linux.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,8 @@ ENOTSUP
550550
ENOTUNIQ
551551
EOF
552552
EOWNERDEAD
553+
EPIOCGPARAMS
554+
EPIOCSPARAMS
553555
EPOLLERR
554556
EPOLLET
555557
EPOLLEXCLUSIVE
@@ -3489,6 +3491,7 @@ epoll_create
34893491
epoll_create1
34903492
epoll_ctl
34913493
epoll_event
3494+
epoll_params
34923495
epoll_pwait
34933496
epoll_wait
34943497
erand48

src/unix/bsd/apple/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ pub type ledger_array_t = *mut ::ledger_t;
7272

7373
pub type iconv_t = *mut ::c_void;
7474

75+
// mach/host_info.h
76+
pub type host_cpu_load_info_t = *mut host_cpu_load_info;
77+
pub type host_cpu_load_info_data_t = host_cpu_load_info;
78+
79+
// mach/processor_info.h
7580
pub type processor_cpu_load_info_t = *mut processor_cpu_load_info;
7681
pub type processor_cpu_load_info_data_t = processor_cpu_load_info;
7782
pub type processor_basic_info_t = *mut processor_basic_info;
@@ -1189,6 +1194,11 @@ s! {
11891194
pub tcpi_rxoutoforderbytes: u64,
11901195
pub tcpi_rxretransmitpackets: u64,
11911196
}
1197+
1198+
// mach/host_info.h
1199+
pub struct host_cpu_load_info {
1200+
pub cpu_ticks: [::natural_t; CPU_STATE_MAX as usize],
1201+
}
11921202
}
11931203

11941204
s_no_extra_traits! {

src/unix/linux_like/linux/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,15 @@ s! {
880880
pub salt: [::c_uchar; TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE],
881881
pub rec_seq: [::c_uchar; TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE],
882882
}
883+
884+
// #include <linux/eventpoll.h>
885+
886+
pub struct epoll_params {
887+
pub busy_poll_usecs: u32,
888+
pub busy_poll_budget: u16,
889+
pub prefer_busy_poll: u8,
890+
pub __pad: u8, // Must be zero
891+
}
883892
}
884893

885894
s_no_extra_traits! {
@@ -4936,6 +4945,10 @@ pub const SCHED_FLAG_ALL: ::c_int = SCHED_FLAG_RESET_ON_FORK
49364945
| SCHED_FLAG_KEEP_ALL
49374946
| SCHED_FLAG_UTIL_CLAMP;
49384947

4948+
// ioctl_eventpoll: added in Linux 6.9
4949+
pub const EPIOCSPARAMS: ::Ioctl = 0x40088a01;
4950+
pub const EPIOCGPARAMS: ::Ioctl = 0x80088a02;
4951+
49394952
f! {
49404953
pub fn NLA_ALIGN(len: ::c_int) -> ::c_int {
49414954
return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)

0 commit comments

Comments
 (0)