Skip to content

Commit

Permalink
Auto merge of #252 - mneumann:freebsd_dragonfly_pthread, r=alexcrichton
Browse files Browse the repository at this point in the history
Add several pthread functions for DragonFly/FreeBSD

These are needed in order to fix/implement the guard page code of Rust
for DragonFly.
  • Loading branch information
bors committed Apr 3, 2016
2 parents 331d705 + 9940be6 commit 46cca7a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,6 @@ extern {
newp: *const ::c_void,
newlen: ::size_t)
-> ::c_int;
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
pub fn sched_setscheduler(pid: ::pid_t,
policy: ::c_int,
param: *const sched_param) -> ::c_int;
Expand Down Expand Up @@ -627,6 +626,15 @@ extern {
name: *mut ::c_char,
termp: *mut termios,
winp: *mut ::winsize) -> ::pid_t;

pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
pub fn pthread_attr_get_np(tid: ::pthread_t,
attr: *mut ::pthread_attr_t) -> ::c_int;
pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
guardsize: *mut ::size_t) -> ::c_int;
pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
stackaddr: *mut *mut ::c_void,
stacksize: *mut ::size_t) -> ::c_int;
}

cfg_if! {
Expand Down

0 comments on commit 46cca7a

Please sign in to comment.