Skip to content

Commit 2fd26c6

Browse files
linux_like: unify SIGEV_THREAD_ID support
This effectively adds the constant for musl too, as last platform of this category. It has been supported in musl since 7c71792e ("add support for SIGEV_THREAD_ID timers") and was released with v1.2.2 in January 2021. Also double-checked that the `sigevent` struct is defined in the exact same way. Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
1 parent dff1a71 commit 2fd26c6

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

libc-test/semver/linux-musl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ PIDFD_NONBLOCK
2424
PR_SET_VMA
2525
PR_SET_VMA_ANON_NAME
2626
SOL_XDP
27+
SIGEV_THREAD_ID
2728
XDP_SHARED_UMEM
2829
XDP_COPY
2930
XDP_ZEROCOPY

src/unix/linux_like/android/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,8 +2204,6 @@ pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);
22042204

22052205
pub const NLA_ALIGNTO: ::c_int = 4;
22062206

2207-
pub const SIGEV_THREAD_ID: ::c_int = 4;
2208-
22092207
pub const CIBAUD: ::tcflag_t = 0o02003600000;
22102208
pub const CBAUDEX: ::tcflag_t = 0o010000;
22112209

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,8 +819,6 @@ pub const PF_NFC: ::c_int = AF_NFC;
819819
pub const PF_VSOCK: ::c_int = AF_VSOCK;
820820
pub const PF_XDP: ::c_int = AF_XDP;
821821

822-
pub const SIGEV_THREAD_ID: ::c_int = 4;
823-
824822
pub const BUFSIZ: ::c_uint = 8192;
825823
pub const TMP_MAX: ::c_uint = 238328;
826824
pub const FOPEN_MAX: ::c_uint = 16;

src/unix/linux_like/linux/uclibc/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,6 @@ pub const MCL_CURRENT: ::c_int = 0x0001;
169169
pub const MCL_FUTURE: ::c_int = 0x0002;
170170
pub const MCL_ONFAULT: ::c_int = 0x0004;
171171

172-
pub const SIGEV_THREAD_ID: ::c_int = 4;
173-
174172
pub const AF_VSOCK: ::c_int = 40;
175173

176174
// Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the

src/unix/linux_like/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,6 +1269,11 @@ pub const CLD_CONTINUED: ::c_int = 6;
12691269
pub const SIGEV_SIGNAL: ::c_int = 0;
12701270
pub const SIGEV_NONE: ::c_int = 1;
12711271
pub const SIGEV_THREAD: ::c_int = 2;
1272+
cfg_if! {
1273+
if #[cfg(not(target_os = "emscripten"))] {
1274+
pub const SIGEV_THREAD_ID: ::c_int = 4;
1275+
}
1276+
}
12721277

12731278
pub const P_ALL: idtype_t = 0;
12741279
pub const P_PID: idtype_t = 1;

0 commit comments

Comments
 (0)