diff --git a/src/unix/notbsd/android/b32.rs b/src/unix/notbsd/android/b32.rs index 9cc469f11405b..6041dcdbc1ad7 100644 --- a/src/unix/notbsd/android/b32.rs +++ b/src/unix/notbsd/android/b32.rs @@ -1,5 +1,7 @@ pub type mode_t = u16; +pub const SYS_gettid: ::c_int = 224; + s! { pub struct sigaction { pub sa_sigaction: ::sighandler_t, diff --git a/src/unix/notbsd/android/b64.rs b/src/unix/notbsd/android/b64.rs index 45fd961581a4d..36c9c0ed7d312 100644 --- a/src/unix/notbsd/android/b64.rs +++ b/src/unix/notbsd/android/b64.rs @@ -1,5 +1,7 @@ pub type mode_t = u32; +pub const SYS_gettid: ::c_int = 178; + s! { pub struct sigaction { pub sa_flags: ::c_uint, diff --git a/src/unix/notbsd/linux/mips.rs b/src/unix/notbsd/linux/mips.rs index d9baf722d1c8a..c9be286c5129c 100644 --- a/src/unix/notbsd/linux/mips.rs +++ b/src/unix/notbsd/linux/mips.rs @@ -472,6 +472,8 @@ pub const RTLD_DEEPBIND: ::c_int = 0x10; pub const RTLD_GLOBAL: ::c_int = 0x4; pub const RTLD_NOLOAD: ::c_int = 0x8; +pub const SYS_gettid: ::c_int = 4222; // Valid for O32 + extern { pub fn sysctl(name: *mut ::c_int, namelen: ::c_int, diff --git a/src/unix/notbsd/linux/musl/b32/arm.rs b/src/unix/notbsd/linux/musl/b32/arm.rs index b59647f94df22..0444ba0ecc64c 100644 --- a/src/unix/notbsd/linux/musl/b32/arm.rs +++ b/src/unix/notbsd/linux/musl/b32/arm.rs @@ -220,6 +220,8 @@ pub const TIOCMSET: ::c_ulong = 0x5418; pub const FIONREAD: ::c_ulong = 0x541B; pub const TIOCCONS: ::c_ulong = 0x541D; +pub const SYS_gettid: ::c_int = 224; + s! { pub struct stat { pub st_dev: ::dev_t, diff --git a/src/unix/notbsd/linux/musl/b32/asmjs.rs b/src/unix/notbsd/linux/musl/b32/asmjs.rs index b59647f94df22..1616c50205080 100644 --- a/src/unix/notbsd/linux/musl/b32/asmjs.rs +++ b/src/unix/notbsd/linux/musl/b32/asmjs.rs @@ -220,6 +220,8 @@ pub const TIOCMSET: ::c_ulong = 0x5418; pub const FIONREAD: ::c_ulong = 0x541B; pub const TIOCCONS: ::c_ulong = 0x541D; +pub const SYS_gettid: ::c_int = 224; // Valid for arm (32-bit) and x86 (32-bit) + s! { pub struct stat { pub st_dev: ::dev_t, diff --git a/src/unix/notbsd/linux/musl/b32/mips.rs b/src/unix/notbsd/linux/musl/b32/mips.rs index 806bde31beeb8..890d4efb20240 100644 --- a/src/unix/notbsd/linux/musl/b32/mips.rs +++ b/src/unix/notbsd/linux/musl/b32/mips.rs @@ -301,3 +301,5 @@ pub const TIOCMBIC: ::c_ulong = 0x741C; pub const TIOCMSET: ::c_ulong = 0x741D; pub const FIONREAD: ::c_ulong = 0x467F; pub const TIOCCONS: ::c_ulong = 0x80047478; + +pub const SYS_gettid: ::c_int = 4222; // Valid for O32 diff --git a/src/unix/notbsd/linux/musl/b32/x86.rs b/src/unix/notbsd/linux/musl/b32/x86.rs index e34997a47233b..4c5d8c2d1ef75 100644 --- a/src/unix/notbsd/linux/musl/b32/x86.rs +++ b/src/unix/notbsd/linux/musl/b32/x86.rs @@ -220,6 +220,8 @@ pub const TIOCMSET: ::c_ulong = 0x5418; pub const FIONREAD: ::c_ulong = 0x541B; pub const TIOCCONS: ::c_ulong = 0x541D; +pub const SYS_gettid: ::c_int = 224; + s! { pub struct stat { pub st_dev: ::dev_t, diff --git a/src/unix/notbsd/linux/musl/b64/mod.rs b/src/unix/notbsd/linux/musl/b64/mod.rs index 0251e83b05c5e..98563980a6de6 100644 --- a/src/unix/notbsd/linux/musl/b64/mod.rs +++ b/src/unix/notbsd/linux/musl/b64/mod.rs @@ -226,6 +226,8 @@ pub const TIOCMSET: ::c_ulong = 0x5418; pub const FIONREAD: ::c_ulong = 0x541B; pub const TIOCCONS: ::c_ulong = 0x541D; +pub const SYS_gettid: ::c_int = 186; // Valid for x86_64 + s! { pub struct stat { pub st_dev: ::dev_t, diff --git a/src/unix/notbsd/linux/other/b32/arm.rs b/src/unix/notbsd/linux/other/b32/arm.rs index aabe8edbe76cb..2383d6b919ecc 100644 --- a/src/unix/notbsd/linux/other/b32/arm.rs +++ b/src/unix/notbsd/linux/other/b32/arm.rs @@ -18,3 +18,5 @@ pub const SO_SNDTIMEO: ::c_int = 21; pub const FIOCLEX: ::c_ulong = 0x5451; pub const FIONBIO: ::c_ulong = 0x5421; + +pub const SYS_gettid: ::c_int = 224; diff --git a/src/unix/notbsd/linux/other/b32/powerpc.rs b/src/unix/notbsd/linux/other/b32/powerpc.rs index 4ebfeda40c186..0ff7a4c642471 100644 --- a/src/unix/notbsd/linux/other/b32/powerpc.rs +++ b/src/unix/notbsd/linux/other/b32/powerpc.rs @@ -18,3 +18,5 @@ pub const SO_SNDTIMEO: ::c_int = 19; pub const FIOCLEX: ::c_ulong = 0x20006601; pub const FIONBIO: ::c_ulong = 0x8004667e; + +pub const SYS_gettid: ::c_int = 207; diff --git a/src/unix/notbsd/linux/other/b32/x86.rs b/src/unix/notbsd/linux/other/b32/x86.rs index 89c2433b2e0b0..5cc48c941be5c 100644 --- a/src/unix/notbsd/linux/other/b32/x86.rs +++ b/src/unix/notbsd/linux/other/b32/x86.rs @@ -19,6 +19,8 @@ pub const SO_SNDTIMEO: ::c_int = 21; pub const FIOCLEX: ::c_ulong = 0x5451; pub const FIONBIO: ::c_ulong = 0x5421; +pub const SYS_gettid: ::c_int = 224; + s! { pub struct mcontext_t { diff --git a/src/unix/notbsd/linux/other/b64/aarch64.rs b/src/unix/notbsd/linux/other/b64/aarch64.rs index b56cb48b5dc6d..55fd4ee64d0eb 100644 --- a/src/unix/notbsd/linux/other/b64/aarch64.rs +++ b/src/unix/notbsd/linux/other/b64/aarch64.rs @@ -26,6 +26,8 @@ pub const SO_SNDTIMEO: ::c_int = 21; pub const FIOCLEX: ::c_ulong = 0x5451; pub const FIONBIO: ::c_ulong = 0x5421; +pub const SYS_gettid: ::c_int = 178; + s! { pub struct stat { pub st_dev: ::dev_t, diff --git a/src/unix/notbsd/linux/other/b64/powerpc64.rs b/src/unix/notbsd/linux/other/b64/powerpc64.rs index 742fb579ba9b3..c860bf44eba35 100644 --- a/src/unix/notbsd/linux/other/b64/powerpc64.rs +++ b/src/unix/notbsd/linux/other/b64/powerpc64.rs @@ -26,6 +26,8 @@ pub const SO_SNDTIMEO: ::c_int = 19; pub const FIOCLEX: ::c_ulong = 0x20006601; pub const FIONBIO: ::c_ulong = 0x8004667e; +pub const SYS_gettid: ::c_int = 207; + s! { pub struct stat { pub st_dev: ::dev_t, diff --git a/src/unix/notbsd/linux/other/b64/x86_64.rs b/src/unix/notbsd/linux/other/b64/x86_64.rs index aea629a29eaf3..290d30717d544 100644 --- a/src/unix/notbsd/linux/other/b64/x86_64.rs +++ b/src/unix/notbsd/linux/other/b64/x86_64.rs @@ -33,6 +33,8 @@ pub const PTRACE_SETFPXREGS: ::c_uint = 19; pub const PTRACE_GETREGS: ::c_uint = 12; pub const PTRACE_SETREGS: ::c_uint = 13; +pub const SYS_gettid: ::c_int = 186; + s! { pub struct stat { pub st_dev: ::dev_t,