Skip to content

Commit 9749a19

Browse files
committed
Add JoinHandleExt to get the pthread_t on unix platforms
Signed-off-by: Peter Atashian <retep998@gmail.com>
1 parent 95cdada commit 9749a19

File tree

14 files changed

+79
-0
lines changed

14 files changed

+79
-0
lines changed

src/libstd/os/android/raw.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
1313
#![stable(feature = "raw_ext", since = "1.1.0")]
1414

15+
use os::raw::c_long;
16+
17+
#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = c_long;
18+
1519
#[doc(inline)]
1620
#[stable(feature = "raw_ext", since = "1.1.0")]
1721
pub use self::arch::{dev_t, mode_t, blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};

src/libstd/os/bitrig/raw.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ use os::unix::raw::{uid_t, gid_t};
2525
#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
2626
#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
2727

28+
#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
29+
2830
#[repr(C)]
2931
#[derive(Clone)]
3032
#[stable(feature = "raw_ext", since = "1.1.0")]

src/libstd/os/dragonfly/raw.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ use os::unix::raw::{uid_t, gid_t};
2525
#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
2626
#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
2727

28+
#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
29+
2830
#[repr(C)]
2931
#[derive(Clone)]
3032
#[stable(feature = "raw_ext", since = "1.1.0")]

src/libstd/os/freebsd/raw.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64;
2222
#[stable(feature = "raw_ext", since = "1.1.0")] pub type fflags_t = u32;
2323

24+
#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
25+
2426
#[doc(inline)]
2527
#[stable(feature = "raw_ext", since = "1.1.0")]
2628
pub use self::arch::{stat, time_t};

src/libstd/os/ios/raw.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ use os::unix::raw::{uid_t, gid_t};
2424
#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
2525
#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = c_long;
2626

27+
#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
28+
2729
#[repr(C)]
2830
#[derive(Clone)]
2931
#[stable(feature = "raw_ext", since = "1.1.0")]

src/libstd/os/linux/raw.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
1212
1313
#![stable(feature = "raw_ext", since = "1.1.0")]
1414

15+
use os::raw::c_ulong;
16+
1517
#[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64;
1618
#[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32;
1719

20+
#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = c_ulong;
21+
1822
#[doc(inline)]
1923
#[stable(feature = "raw_ext", since = "1.1.0")]
2024
pub use self::arch::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t};

src/libstd/os/macos/raw.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ use os::unix::raw::{uid_t, gid_t};
2424
#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
2525
#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = c_long;
2626

27+
#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
28+
2729
#[repr(C)]
2830
#[derive(Clone)]
2931
#[stable(feature = "raw_ext", since = "1.1.0")]

src/libstd/os/nacl/raw.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32;
2525
#[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i32;
2626

27+
#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
28+
2729
#[repr(C)]
2830
#[derive(Copy, Clone)]
2931
#[stable(feature = "raw_ext", since = "1.1.0")]

src/libstd/os/netbsd/raw.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ use os::unix::raw::{uid_t, gid_t};
2525
#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
2626
#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
2727

28+
#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
29+
2830
#[repr(C)]
2931
#[derive(Clone)]
3032
#[stable(feature = "raw_ext", since = "1.1.0")]

src/libstd/os/openbsd/raw.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ use os::unix::raw::{uid_t, gid_t};
2525
#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
2626
#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
2727

28+
#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
29+
2830
#[repr(C)]
2931
#[derive(Clone)]
3032
#[stable(feature = "raw_ext", since = "1.1.0")]

0 commit comments

Comments
 (0)