Skip to content

Commit 46cca7a

Browse files
committed
Auto merge of rust-lang#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.
2 parents 331d705 + 9940be6 commit 46cca7a

File tree

1 file changed

+9
-1
lines changed
  • src/unix/bsd/freebsdlike

1 file changed

+9
-1
lines changed

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,6 @@ extern {
598598
newp: *const ::c_void,
599599
newlen: ::size_t)
600600
-> ::c_int;
601-
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
602601
pub fn sched_setscheduler(pid: ::pid_t,
603602
policy: ::c_int,
604603
param: *const sched_param) -> ::c_int;
@@ -627,6 +626,15 @@ extern {
627626
name: *mut ::c_char,
628627
termp: *mut termios,
629628
winp: *mut ::winsize) -> ::pid_t;
629+
630+
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
631+
pub fn pthread_attr_get_np(tid: ::pthread_t,
632+
attr: *mut ::pthread_attr_t) -> ::c_int;
633+
pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
634+
guardsize: *mut ::size_t) -> ::c_int;
635+
pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
636+
stackaddr: *mut *mut ::c_void,
637+
stacksize: *mut ::size_t) -> ::c_int;
630638
}
631639

632640
cfg_if! {

0 commit comments

Comments
 (0)