From 7b2938ef6863328e06cda44ab007c61306793cc2 Mon Sep 17 00:00:00 2001 From: Michael Neumann Date: Sat, 2 Apr 2016 16:31:55 +0200 Subject: [PATCH] Additional pthread functions for DragonFly. These are needed in order to fix/implement the guard page code of Rust for DragonFly. --- src/unix/bsd/freebsdlike/dragonfly/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs index 865244265f8a5..d5985d1f23148 100644 --- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -115,4 +115,12 @@ extern { pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; pub fn clock_gettime(clk_id: ::c_ulong, tp: *mut ::timespec) -> ::c_int; + + 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; }