Skip to content

Commit ba5f4c0

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 <[email protected]>
1 parent 09d7aa0 commit ba5f4c0

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
@@ -416,7 +416,6 @@ RWF_NOWAIT
416416
RWF_SYNC
417417
SECURITYFS_MAGIC
418418
SELINUX_MAGIC
419-
SIGEV_THREAD_ID
420419
SMACK_MAGIC
421420
SMB_SUPER_MAGIC
422421
SOL_CAIF

libc-test/semver/linux.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,6 +2501,7 @@ SHORT_INODE
25012501
SIGEV_NONE
25022502
SIGEV_SIGNAL
25032503
SIGEV_THREAD
2504+
SIGEV_THREAD_ID
25042505
SIGIO
25052506
SIGPOLL
25062507
SIGPWR

src/unix/linux_like/android/mod.rs

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

22262226
pub const NLA_ALIGNTO: ::c_int = 4;
22272227

2228-
pub const SIGEV_THREAD_ID: ::c_int = 4;
2229-
22302228
pub const CIBAUD: ::tcflag_t = 0o02003600000;
22312229
pub const CBAUDEX: ::tcflag_t = 0o010000;
22322230

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,8 +868,6 @@ pub const PF_NFC: ::c_int = AF_NFC;
868868
pub const PF_VSOCK: ::c_int = AF_VSOCK;
869869
pub const PF_XDP: ::c_int = AF_XDP;
870870

871-
pub const SIGEV_THREAD_ID: ::c_int = 4;
872-
873871
pub const BUFSIZ: ::c_uint = 8192;
874872
pub const TMP_MAX: ::c_uint = 238328;
875873
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)