Skip to content

Commit

Permalink
openbsd: rebase to master
Browse files Browse the repository at this point in the history
- incoporate changes introduced by #21678
  • Loading branch information
semarie committed Feb 1, 2015
1 parent fdb5d77 commit f6414b0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/libstd/sys/unix/thread.rs
Expand Up @@ -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());
Expand Down Expand Up @@ -314,7 +316,9 @@ extern {
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);
Expand All @@ -330,7 +334,6 @@ extern {

#[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;
Expand Down

0 comments on commit f6414b0

Please sign in to comment.