]> git.lizzy.rs Git - rust.git/commitdiff
openbsd: rebase to master
authorSébastien Marie <semarie@users.noreply.github.com>
Sun, 1 Feb 2015 13:58:57 +0000 (14:58 +0100)
committerSébastien Marie <semarie@users.noreply.github.com>
Sun, 1 Feb 2015 14:34:59 +0000 (15:34 +0100)
- incoporate changes introduced by #21678

src/libstd/sys/unix/thread.rs

index 433c37a97f396223a26bd5c1d4d0036ec46a48de..6f030ee91fe2d6db045ca5daec23dc3dc8240c8c 100644 (file)
@@ -248,7 +248,9 @@ pub unsafe fn set_name(name: &str) {
     }
 }
 
-#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
+#[cfg(any(target_os = "freebsd",
+          target_os = "dragonfly",
+          target_os = "openbsd"))]
 pub unsafe fn set_name(name: &str) {
     // pthread_set_name_np() since almost forever on all BSDs
     let cname = CString::from_slice(name.as_bytes());
@@ -314,7 +316,9 @@ pub fn pthread_attr_getstack(attr: *const libc::pthread_attr_t,
                                  stacksize: *mut libc::size_t) -> libc::c_int;
 }
 
-#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
+#[cfg(any(target_os = "freebsd",
+          target_os = "dragonfly",
+          target_os = "openbsd"))]
 extern {
     pub fn pthread_self() -> libc::pthread_t;
     fn pthread_set_name_np(tid: libc::pthread_t, name: *const libc::c_char);
@@ -330,7 +334,6 @@ pub fn pthread_attr_getstack(attr: *const libc::pthread_attr_t,
 
 #[cfg(target_os = "openbsd")]
 extern {
-        pub fn pthread_self() -> libc::pthread_t;
         pub fn pthread_stackseg_np(thread: libc::pthread_t,
                                    sinfo: *mut stack_t) -> libc::c_uint;
         pub fn pthread_main_np() -> libc::c_uint;