summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-04-03 11:54:31 -0700
committerbors <bors@rust-lang.org>2016-04-03 11:54:31 -0700
commit46cca7a06ec4b3bdd080313d1c5a358a612412ac (patch)
treef3bcb2966a3c20e678c2d05d086976f1caba27b0
parent331d70519ed20106b0db5292141fa10883fa4b23 (diff)
parent9940be6937d9f8985f7dfbca42813c1d7287865a (diff)
downloadrust-libc-46cca7a06ec4b3bdd080313d1c5a358a612412ac.tar.gz
Auto merge of #252 - mneumann:freebsd_dragonfly_pthread, r=alexcrichton
Add several pthread functions for DragonFly/FreeBSD These are needed in order to fix/implement the guard page code of Rust for DragonFly.
-rw-r--r--src/unix/bsd/freebsdlike/mod.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs
index ddc453ee94..8828401e4b 100644
--- a/src/unix/bsd/freebsdlike/mod.rs
+++ b/src/unix/bsd/freebsdlike/mod.rs
@@ -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;
@@ -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! {