]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys/unix/thread.rs
Add support for the Haiku operating system on x86 and x86_64 machines
[rust.git] / src / libstd / sys / unix / thread.rs
index 75e10d2585308cecb85d17e374fff32c0842509f..98a4168d4fd347e641e0b6d99b0faa23425222bb 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use prelude::v1::*;
-
 use alloc::boxed::FnBox;
 use cmp;
 use ffi::CStr;
@@ -122,6 +120,11 @@ pub fn set_name(_name: &CStr) {
         // Newlib, Illumos and Emscripten have no way to set a thread name.
     }
 
+    #[cfg(target_os = "haiku")]
+    pub fn set_name(_name: &CStr) {
+        // Haiku has no way to set a thread name.
+    }
+
     pub fn sleep(dur: Duration) {
         let mut secs = dur.as_secs();
         let mut nsecs = dur.subsec_nanos() as libc::c_long;
@@ -193,8 +196,6 @@ pub unsafe fn init() -> Option<usize> { None }
           target_os = "solaris"))]
 #[cfg_attr(test, allow(dead_code))]
 pub mod guard {
-    use prelude::v1::*;
-
     use libc;
     use libc::mmap;
     use libc::{PROT_NONE, MAP_PRIVATE, MAP_ANON, MAP_FAILED, MAP_FIXED};