Skip to content

Commit c007127

Browse files
committed
Move pthread_*_np functions to correct BSD modules
These functions were never available on NetBSD, they belong to OpenBSD/Bitrig.
1 parent 37d4bb9 commit c007127

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/unix/bsd/openbsdlike/bitrig.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ extern {
227227
flags: ::c_int) -> ::c_int;
228228
pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
229229
-> ::c_int;
230+
pub fn pthread_main_np() -> ::c_int;
231+
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
232+
pub fn pthread_stackseg_np(thread: ::pthread_t,
233+
sinfo: *mut ::stack_t) -> ::c_int;
230234
pub fn sysctl(name: *mut ::c_int,
231235
namelen: ::c_uint,
232236
oldp: *mut ::c_void,

src/unix/bsd/openbsdlike/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,6 @@ extern {
384384
pub fn __errno() -> *mut ::c_int;
385385
pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t)
386386
-> ::c_int;
387-
pub fn pthread_main_np() -> ::c_int;
388-
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
389-
pub fn pthread_stackseg_np(thread: ::pthread_t,
390-
sinfo: *mut ::stack_t) -> ::c_int;
391387
pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void;
392388
pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
393389
pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int;

src/unix/bsd/openbsdlike/openbsd.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ extern {
232232
flags: ::c_int) -> ::c_int;
233233
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
234234
-> ::c_int;
235+
pub fn pthread_main_np() -> ::c_int;
236+
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
237+
pub fn pthread_stackseg_np(thread: ::pthread_t,
238+
sinfo: *mut ::stack_t) -> ::c_int;
235239
pub fn sysctl(name: *const ::c_int,
236240
namelen: ::c_uint,
237241
oldp: *mut ::c_void,

0 commit comments

Comments
 (0)