From 3e4c019a73646d0beb719b9b0b30f55fb0a14917 Mon Sep 17 00:00:00 2001 From: Dave Hylands Date: Sat, 5 Mar 2016 12:44:49 -0800 Subject: [PATCH] Add SYS_gettid --- src/unix/notbsd/android/b32.rs | 2 ++ src/unix/notbsd/android/b64.rs | 2 ++ src/unix/notbsd/linux/mips.rs | 2 ++ src/unix/notbsd/linux/musl/b32/arm.rs | 2 ++ src/unix/notbsd/linux/musl/b32/asmjs.rs | 2 ++ src/unix/notbsd/linux/musl/b32/mips.rs | 2 ++ src/unix/notbsd/linux/musl/b32/x86.rs | 2 ++ src/unix/notbsd/linux/musl/b64/mod.rs | 2 ++ src/unix/notbsd/linux/other/b32/arm.rs | 2 ++ src/unix/notbsd/linux/other/b32/powerpc.rs | 2 ++ src/unix/notbsd/linux/other/b32/x86.rs | 2 ++ src/unix/notbsd/linux/other/b64/aarch64.rs | 2 ++ src/unix/notbsd/linux/other/b64/powerpc64.rs | 2 ++ src/unix/notbsd/linux/other/b64/x86_64.rs | 2 ++ 14 files changed, 28 insertions(+) diff --git a/src/unix/notbsd/android/b32.rs b/src/unix/notbsd/android/b32.rs index 9cc469f1..6041dcdb 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 45fd9615..36c9c0ed 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 d9baf722..c9be286c 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 b59647f9..0444ba0e 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 b59647f9..1616c502 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 806bde31..890d4efb 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 e34997a4..4c5d8c2d 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 0251e83b..98563980 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 aabe8edb..2383d6b9 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 4ebfeda4..0ff7a4c6 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 89c2433b..5cc48c94 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 b56cb48b..55fd4ee6 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 742fb579..c860bf44 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 aea629a2..290d3071 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,