Skip to content

Commit 3b195de

Browse files
committed
Auto merge of #2427 - devnexen:pthread_mach_thread_mac, r=JohnTitor
add pthread_create_from_mach_thread for apple
2 parents a7932ac + 610c901 commit 3b195de

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ fn test_apple(target: &str) {
222222
"netinet/udp.h",
223223
"poll.h",
224224
"pthread.h",
225+
"pthread_spis.h",
225226
"pwd.h",
226227
"regex.h",
227228
"resolv.h",

libc-test/semver/apple.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,6 +1822,7 @@ pseudo_AF_RTIP
18221822
pseudo_AF_XTP
18231823
pthread_attr_getschedparam
18241824
pthread_attr_setschedparam
1825+
pthread_create_from_mach_thread
18251826
pthread_getschedparam
18261827
pthread_setschedparam
18271828
pthread_cancel

src/unix/bsd/apple/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4788,6 +4788,12 @@ extern "C" {
47884788
pub fn pthread_getname_np(thread: ::pthread_t, name: *mut ::c_char, len: ::size_t) -> ::c_int;
47894789
pub fn pthread_mach_thread_np(thread: ::pthread_t) -> ::mach_port_t;
47904790
pub fn pthread_from_mach_thread_np(port: ::mach_port_t) -> ::pthread_t;
4791+
pub fn pthread_create_from_mach_thread(
4792+
thread: *mut ::pthread_t,
4793+
attr: *const ::pthread_attr_t,
4794+
f: extern "C" fn(*mut ::c_void) -> *mut ::c_void,
4795+
value: *mut ::c_void,
4796+
) -> ::c_int;
47914797
pub fn pthread_get_stackaddr_np(thread: ::pthread_t) -> *mut ::c_void;
47924798
pub fn pthread_get_stacksize_np(thread: ::pthread_t) -> ::size_t;
47934799
pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int;

0 commit comments

Comments
 (0)