Merge pull request #78 from skade/fix-netbsd

Add netbsds pthread_setname_np
This commit is contained in:
Alex Crichton 2015-11-25 14:35:17 -06:00
commit 0bf374fe6d
4 changed files with 33 additions and 1 deletions

View file

@ -14,3 +14,7 @@ s! {
__unused7: *mut ::c_void,
}
}
extern {
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
}

View file

@ -530,7 +530,6 @@ extern {
newlen: ::size_t)
-> ::c_int;
pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int;
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
pub fn pthread_main_np() -> ::c_uint;
pub fn pthread_stackseg_np(thread: ::pthread_t,
sinfo: *mut ::stack_t) -> ::c_uint;
@ -543,6 +542,9 @@ cfg_if! {
if #[cfg(target_os = "bitrig")] {
mod bitrig;
pub use self::bitrig::*;
} else if #[cfg(target_os = "netbsd")] {
mod netbsd;
pub use self::netbsd::*;
} else {
mod openbsd;
pub use self::openbsd::*;

View file

@ -0,0 +1,22 @@
s! {
pub struct glob_t {
pub gl_pathc: ::c_int,
__unused1: ::c_int,
pub gl_offs: ::c_int,
__unused2: ::c_int,
pub gl_pathv: *mut *mut ::c_char,
__unused3: *mut ::c_void,
__unused4: *mut ::c_void,
__unused5: *mut ::c_void,
__unused6: *mut ::c_void,
__unused7: *mut ::c_void,
__unused8: *mut ::c_void,
__unused9: *mut ::c_void,
}
}
extern {
pub fn pthread_setname_np(tid: ::pthread_t, format: *const ::c_char, name: *const ::c_void);
}

View file

@ -16,3 +16,7 @@ s! {
__unused9: *mut ::c_void,
}
}
extern {
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
}