diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-12-15 18:17:43 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-12-16 22:55:49 -0800 |
| commit | 39a6c9d6376f96cc8b905f00b88d20e42961206c (patch) | |
| tree | 9dde8eaa226ad53aa1d80233557a30811d913ef3 /src/libstd/rt | |
| parent | 529e268ab900f1b6e731af64ce2aeecda3555f4e (diff) | |
| download | rust-39a6c9d6376f96cc8b905f00b88d20e42961206c.tar.gz rust-39a6c9d6376f96cc8b905f00b88d20e42961206c.zip | |
Test fallout from std::comm rewrite
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/thread.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs index da02988c75c..6128f310a2e 100644 --- a/src/libstd/rt/thread.rs +++ b/src/libstd/rt/thread.rs @@ -132,11 +132,13 @@ impl<T: Send> Drop for Thread<T> { #[cfg(windows)] mod imp { + use super::DEFAULT_STACK_SIZE; + + use cast; + use libc; use libc::types::os::arch::extra::{LPSECURITY_ATTRIBUTES, SIZE_T, BOOL, LPVOID, DWORD, LPDWORD, HANDLE}; - use libc; - use cast; - use super::DEFAULT_STACK_SIZE; + use ptr; pub type rust_thread = HANDLE; pub type rust_thread_return = DWORD; @@ -210,9 +212,10 @@ mod imp { } #[cfg(target_os = "macos")] + #[cfg(target_os = "android")] pub unsafe fn yield_now() { assert_eq!(sched_yield(), 0); } - #[cfg(not(target_os = "macos"))] + #[cfg(not(target_os = "macos"), not(target_os = "android"))] pub unsafe fn yield_now() { assert_eq!(pthread_yield(), 0); } extern { @@ -230,8 +233,9 @@ mod imp { fn pthread_detach(thread: libc::pthread_t) -> libc::c_int; #[cfg(target_os = "macos")] + #[cfg(target_os = "android")] fn sched_yield() -> libc::c_int; - #[cfg(not(target_os = "macos"))] + #[cfg(not(target_os = "macos"), not(target_os = "android"))] fn pthread_yield() -> libc::c_int; } } |
