Skip to content

Commit 91e15d4

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. (FWIW, emscripten also supports this.) Also double-checked that the `sigevent` struct is defined in the exact same way. Signed-off-by: Christoph Heiss <[email protected]>
1 parent bbafd45 commit 91e15d4

File tree

6 files changed

+3
-7
lines changed

6 files changed

+3
-7
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ RWF_NOWAIT
398398
RWF_SYNC
399399
SECURITYFS_MAGIC
400400
SELINUX_MAGIC
401-
SIGEV_THREAD_ID
402401
SMACK_MAGIC
403402
SMB_SUPER_MAGIC
404403
SOL_CAIF

libc-test/semver/linux.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2846,6 +2846,7 @@ SHORT_INODE
28462846
SIGEV_NONE
28472847
SIGEV_SIGNAL
28482848
SIGEV_THREAD
2849+
SIGEV_THREAD_ID
28492850
SIGIO
28502851
SIGPOLL
28512852
SIGPWR

src/unix/linux_like/android/mod.rs

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

19961996
pub const NLA_ALIGNTO: c_int = 4;
19971997

1998-
pub const SIGEV_THREAD_ID: c_int = 4;
1999-
20001998
pub const CIBAUD: crate::tcflag_t = 0o02003600000;
20011999
pub const CBAUDEX: crate::tcflag_t = 0o010000;
20022000

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,6 @@ pub const PF_NFC: c_int = AF_NFC;
707707
pub const PF_VSOCK: c_int = AF_VSOCK;
708708
pub const PF_XDP: c_int = AF_XDP;
709709

710-
pub const SIGEV_THREAD_ID: c_int = 4;
711-
712710
pub const BUFSIZ: c_uint = 8192;
713711
pub const TMP_MAX: c_uint = 238328;
714712
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
@@ -243,8 +243,6 @@ pub const MCL_CURRENT: c_int = 0x0001;
243243
pub const MCL_FUTURE: c_int = 0x0002;
244244
pub const MCL_ONFAULT: c_int = 0x0004;
245245

246-
pub const SIGEV_THREAD_ID: c_int = 4;
247-
248246
pub const AF_VSOCK: c_int = 40;
249247

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

src/unix/linux_like/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,8 @@ pub const CLD_CONTINUED: c_int = 6;
13521352
pub const SIGEV_SIGNAL: c_int = 0;
13531353
pub const SIGEV_NONE: c_int = 1;
13541354
pub const SIGEV_THREAD: c_int = 2;
1355+
#[cfg(any(not(target_env = "musl"), musl_v1_2_3))]
1356+
pub const SIGEV_THREAD_ID: c_int = 4;
13551357

13561358
pub const P_ALL: idtype_t = 0;
13571359
pub const P_PID: idtype_t = 1;

0 commit comments

Comments
 (0)