Skip to content

Commit 3716321

Browse files
committed
Add SYS_gettid
1 parent 5f527b0 commit 3716321

File tree

13 files changed

+26
-0
lines changed

13 files changed

+26
-0
lines changed

src/unix/notbsd/android/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ pub type fsblkcnt_t = ::c_ulong;
2525
pub type nfds_t = ::c_uint;
2626
pub type rlim_t = c_ulong;
2727

28+
pub const SYS_gettid: ::c_int = 178; // Valid for ARM
29+
2830
s! {
2931
pub struct stat {
3032
pub st_dev: ::c_ulonglong,

src/unix/notbsd/linux/mips.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,8 @@ pub const RTLD_DEEPBIND: ::c_int = 0x10;
472472
pub const RTLD_GLOBAL: ::c_int = 0x4;
473473
pub const RTLD_NOLOAD: ::c_int = 0x8;
474474

475+
pub const SYS_gettid: ::c_int = 4222; // Valid for O32
476+
475477
extern {
476478
pub fn sysctl(name: *mut ::c_int,
477479
namelen: ::c_int,

src/unix/notbsd/linux/musl/b32/arm.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ pub const TIOCMSET: ::c_ulong = 0x5418;
220220
pub const FIONREAD: ::c_ulong = 0x541B;
221221
pub const TIOCCONS: ::c_ulong = 0x541D;
222222

223+
pub const SYS_gettid: ::c_int = 178;
224+
223225
s! {
224226
pub struct stat {
225227
pub st_dev: ::dev_t,

src/unix/notbsd/linux/musl/b32/asmjs.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ pub const TIOCMSET: ::c_ulong = 0x5418;
220220
pub const FIONREAD: ::c_ulong = 0x541B;
221221
pub const TIOCCONS: ::c_ulong = 0x541D;
222222

223+
pub const SYS_gettid: ::c_int = 178;
224+
223225
s! {
224226
pub struct stat {
225227
pub st_dev: ::dev_t,

src/unix/notbsd/linux/musl/b32/mips.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,3 +301,5 @@ pub const TIOCMBIC: ::c_ulong = 0x741C;
301301
pub const TIOCMSET: ::c_ulong = 0x741D;
302302
pub const FIONREAD: ::c_ulong = 0x467F;
303303
pub const TIOCCONS: ::c_ulong = 0x80047478;
304+
305+
pub const SYS_gettid: ::c_int = 4222; // Valid for O32

src/unix/notbsd/linux/musl/b32/x86.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ pub const TIOCMSET: ::c_ulong = 0x5418;
220220
pub const FIONREAD: ::c_ulong = 0x541B;
221221
pub const TIOCCONS: ::c_ulong = 0x541D;
222222

223+
pub const SYS_gettid: ::c_int = 224;
224+
223225
s! {
224226
pub struct stat {
225227
pub st_dev: ::dev_t,

src/unix/notbsd/linux/musl/b64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ pub const TIOCMSET: ::c_ulong = 0x5418;
226226
pub const FIONREAD: ::c_ulong = 0x541B;
227227
pub const TIOCCONS: ::c_ulong = 0x541D;
228228

229+
pub const SYS_gettid: ::c_int = 186; // Valid for x86_64
230+
229231
s! {
230232
pub struct stat {
231233
pub st_dev: ::dev_t,

src/unix/notbsd/linux/other/b32/arm.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ pub const SO_SNDTIMEO: ::c_int = 21;
1818

1919
pub const FIOCLEX: ::c_ulong = 0x5451;
2020
pub const FIONBIO: ::c_ulong = 0x5421;
21+
22+
pub const SYS_gettid: ::c_int = 178;

src/unix/notbsd/linux/other/b32/powerpc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ pub const SO_SNDTIMEO: ::c_int = 19;
1818

1919
pub const FIOCLEX: ::c_ulong = 0x20006601;
2020
pub const FIONBIO: ::c_ulong = 0x8004667e;
21+
22+
pub const SYS_gettid: ::c_int = 207;

src/unix/notbsd/linux/other/b32/x86.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ pub const SO_SNDTIMEO: ::c_int = 21;
1919
pub const FIOCLEX: ::c_ulong = 0x5451;
2020
pub const FIONBIO: ::c_ulong = 0x5421;
2121

22+
pub const SYS_gettid: ::c_int = 224;
23+
2224
s! {
2325

2426
pub struct mcontext_t {

src/unix/notbsd/linux/other/b64/aarch64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ pub const SO_SNDTIMEO: ::c_int = 21;
2626
pub const FIOCLEX: ::c_ulong = 0x5451;
2727
pub const FIONBIO: ::c_ulong = 0x5421;
2828

29+
pub const SYS_gettid: ::c_int = 178;
30+
2931
s! {
3032
pub struct stat {
3133
pub st_dev: ::dev_t,

src/unix/notbsd/linux/other/b64/powerpc64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ pub const SO_SNDTIMEO: ::c_int = 19;
2626
pub const FIOCLEX: ::c_ulong = 0x20006601;
2727
pub const FIONBIO: ::c_ulong = 0x8004667e;
2828

29+
pub const SYS_gettid: ::c_int = 207;
30+
2931
s! {
3032
pub struct stat {
3133
pub st_dev: ::dev_t,

src/unix/notbsd/linux/other/b64/x86_64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ pub const PTRACE_SETFPXREGS: ::c_uint = 19;
3333
pub const PTRACE_GETREGS: ::c_uint = 12;
3434
pub const PTRACE_SETREGS: ::c_uint = 13;
3535

36+
pub const SYS_gettid: ::c_int = 186;
37+
3638
s! {
3739
pub struct stat {
3840
pub st_dev: ::dev_t,

0 commit comments

Comments
 (0)