Add netbsds pthread_setname_np

This commit is contained in:
Florian Gilcher 2015-11-25 18:01:32 +01:00
parent e6714f3c70
commit b9865f8768
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);
}