Skip to content

Commit 9272dc5

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 8f20f00 commit 9272dc5

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ RWF_NOWAIT
409409
RWF_SYNC
410410
SECURITYFS_MAGIC
411411
SELINUX_MAGIC
412-
SIGEV_THREAD_ID
413412
SMACK_MAGIC
414413
SMB_SUPER_MAGIC
415414
SOL_CAIF

libc-test/semver/linux.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,6 +2498,7 @@ SHORT_INODE
24982498
SIGEV_NONE
24992499
SIGEV_SIGNAL
25002500
SIGEV_THREAD
2501+
SIGEV_THREAD_ID
25012502
SIGIO
25022503
SIGPOLL
25032504
SIGPWR

src/unix/linux_like/android/mod.rs

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

22102210
pub const NLA_ALIGNTO: ::c_int = 4;
22112211

2212-
pub const SIGEV_THREAD_ID: ::c_int = 4;
2213-
22142212
pub const CIBAUD: ::tcflag_t = 0o02003600000;
22152213
pub const CBAUDEX: ::tcflag_t = 0o010000;
22162214

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)