about summary refs log tree commit diff
path: root/src/libstd/os
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-12-05 20:49:16 +0000
committerbors <bors@rust-lang.org>2015-12-05 20:49:16 +0000
commitaad4e5665e81a3ec998b3648d395d0eb99a7500b (patch)
tree7c9286e32c368bcfb7eb295fd4b35e9eb7285c01 /src/libstd/os
parent9f715e98925adbf205bccd8a044266c77197db50 (diff)
parent9749a193d629dd723562004879bca3e2d47e25a1 (diff)
downloadrust-aad4e5665e81a3ec998b3648d395d0eb99a7500b.tar.gz
rust-aad4e5665e81a3ec998b3648d395d0eb99a7500b.zip
Auto merge of #30177 - retep998:handling-threads, r=alexcrichton
Allows a `HANDLE` to be extracted from a `JoinHandle` on Windows.
Allows a `pthread_t` to be extracted from a `JoinHandle` everywhere else.

Because https://github.com/rust-lang/rust/pull/29461 was closed.

r? @alexcrichton
Diffstat (limited to 'src/libstd/os')
-rw-r--r--src/libstd/os/android/raw.rs4
-rw-r--r--src/libstd/os/bitrig/raw.rs2
-rw-r--r--src/libstd/os/dragonfly/raw.rs2
-rw-r--r--src/libstd/os/freebsd/raw.rs2
-rw-r--r--src/libstd/os/ios/raw.rs2
-rw-r--r--src/libstd/os/linux/raw.rs4
-rw-r--r--src/libstd/os/macos/raw.rs2
-rw-r--r--src/libstd/os/nacl/raw.rs2
-rw-r--r--src/libstd/os/netbsd/raw.rs2
-rw-r--r--src/libstd/os/openbsd/raw.rs2
10 files changed, 24 insertions, 0 deletions
diff --git a/src/libstd/os/android/raw.rs b/src/libstd/os/android/raw.rs
index fe28a738756..e58ba03ec67 100644
--- a/src/libstd/os/android/raw.rs
+++ b/src/libstd/os/android/raw.rs
@@ -12,6 +12,10 @@
 
 #![stable(feature = "raw_ext", since = "1.1.0")]
 
+use os::raw::c_long;
+
+#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = c_long;
+
 #[doc(inline)]
 #[stable(feature = "raw_ext", since = "1.1.0")]
 pub use self::arch::{dev_t, mode_t, blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
diff --git a/src/libstd/os/bitrig/raw.rs b/src/libstd/os/bitrig/raw.rs
index 45e46b252a4..81de8810cba 100644
--- a/src/libstd/os/bitrig/raw.rs
+++ b/src/libstd/os/bitrig/raw.rs
@@ -25,6 +25,8 @@ use os::unix::raw::{uid_t, gid_t};
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
 
+#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
+
 #[repr(C)]
 #[derive(Clone)]
 #[stable(feature = "raw_ext", since = "1.1.0")]
diff --git a/src/libstd/os/dragonfly/raw.rs b/src/libstd/os/dragonfly/raw.rs
index cb692b0662a..581aebebc03 100644
--- a/src/libstd/os/dragonfly/raw.rs
+++ b/src/libstd/os/dragonfly/raw.rs
@@ -25,6 +25,8 @@ use os::unix::raw::{uid_t, gid_t};
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
 
+#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
+
 #[repr(C)]
 #[derive(Clone)]
 #[stable(feature = "raw_ext", since = "1.1.0")]
diff --git a/src/libstd/os/freebsd/raw.rs b/src/libstd/os/freebsd/raw.rs
index cb8fadbfd6e..a1e39721bcf 100644
--- a/src/libstd/os/freebsd/raw.rs
+++ b/src/libstd/os/freebsd/raw.rs
@@ -21,6 +21,8 @@
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type fflags_t = u32;
 
+#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
+
 #[doc(inline)]
 #[stable(feature = "raw_ext", since = "1.1.0")]
 pub use self::arch::{stat, time_t};
diff --git a/src/libstd/os/ios/raw.rs b/src/libstd/os/ios/raw.rs
index aeb3e993a72..20fe833a980 100644
--- a/src/libstd/os/ios/raw.rs
+++ b/src/libstd/os/ios/raw.rs
@@ -24,6 +24,8 @@ use os::unix::raw::{uid_t, gid_t};
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = c_long;
 
+#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
+
 #[repr(C)]
 #[derive(Clone)]
 #[stable(feature = "raw_ext", since = "1.1.0")]
diff --git a/src/libstd/os/linux/raw.rs b/src/libstd/os/linux/raw.rs
index 35de9bfc194..f44199f311b 100644
--- a/src/libstd/os/linux/raw.rs
+++ b/src/libstd/os/linux/raw.rs
@@ -12,9 +12,13 @@
 
 #![stable(feature = "raw_ext", since = "1.1.0")]
 
+use os::raw::c_ulong;
+
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32;
 
+#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = c_ulong;
+
 #[doc(inline)]
 #[stable(feature = "raw_ext", since = "1.1.0")]
 pub use self::arch::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t};
diff --git a/src/libstd/os/macos/raw.rs b/src/libstd/os/macos/raw.rs
index 4abd6f2d4de..1407132b9c9 100644
--- a/src/libstd/os/macos/raw.rs
+++ b/src/libstd/os/macos/raw.rs
@@ -24,6 +24,8 @@ use os::unix::raw::{uid_t, gid_t};
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = c_long;
 
+#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
+
 #[repr(C)]
 #[derive(Clone)]
 #[stable(feature = "raw_ext", since = "1.1.0")]
diff --git a/src/libstd/os/nacl/raw.rs b/src/libstd/os/nacl/raw.rs
index 36f8a5fb5c9..7258a14aaf4 100644
--- a/src/libstd/os/nacl/raw.rs
+++ b/src/libstd/os/nacl/raw.rs
@@ -24,6 +24,8 @@
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i32;
 
+#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
+
 #[repr(C)]
 #[derive(Copy, Clone)]
 #[stable(feature = "raw_ext", since = "1.1.0")]
diff --git a/src/libstd/os/netbsd/raw.rs b/src/libstd/os/netbsd/raw.rs
index 882d08c6606..9ca58924955 100644
--- a/src/libstd/os/netbsd/raw.rs
+++ b/src/libstd/os/netbsd/raw.rs
@@ -25,6 +25,8 @@ use os::unix::raw::{uid_t, gid_t};
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
 
+#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
+
 #[repr(C)]
 #[derive(Clone)]
 #[stable(feature = "raw_ext", since = "1.1.0")]
diff --git a/src/libstd/os/openbsd/raw.rs b/src/libstd/os/openbsd/raw.rs
index 1cc0eedfcd0..209546c4e4f 100644
--- a/src/libstd/os/openbsd/raw.rs
+++ b/src/libstd/os/openbsd/raw.rs
@@ -25,6 +25,8 @@ use os::unix::raw::{uid_t, gid_t};
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
 
+#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
+
 #[repr(C)]
 #[derive(Clone)]
 #[stable(feature = "raw_ext", since = "1.1.0")]