diff options
author | bors <bors@rust-lang.org> | 2021-10-06 23:58:48 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2021-10-06 23:58:48 +0000 |
commit | 3b195de972b5c1532e157dcb76aa709fa6d239ab (patch) | |
tree | f2bab66d7d9eaaf30cc00f6912dd1b7f1eabf88f | |
parent | a7932acd5279711161e2e3b4325ebd5422671c1c (diff) | |
parent | 610c901d022826c97e5d507ebf1f9cc22d0f2431 (diff) | |
download | rust-libc-3b195de972b5c1532e157dcb76aa709fa6d239ab.tar.gz |
Auto merge of #2427 - devnexen:pthread_mach_thread_mac, r=JohnTitor
add pthread_create_from_mach_thread for apple
-rw-r--r-- | libc-test/build.rs | 1 | ||||
-rw-r--r-- | libc-test/semver/apple.txt | 1 | ||||
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index c9d4368b19..bde2a15950 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -222,6 +222,7 @@ fn test_apple(target: &str) { "netinet/udp.h", "poll.h", "pthread.h", + "pthread_spis.h", "pwd.h", "regex.h", "resolv.h", diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index 1814d73ffc..5bbb7bf1eb 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -1822,6 +1822,7 @@ pseudo_AF_RTIP pseudo_AF_XTP pthread_attr_getschedparam pthread_attr_setschedparam +pthread_create_from_mach_thread pthread_getschedparam pthread_setschedparam pthread_cancel diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 63dd83b13f..d735db77f9 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -4788,6 +4788,12 @@ extern "C" { pub fn pthread_getname_np(thread: ::pthread_t, name: *mut ::c_char, len: ::size_t) -> ::c_int; pub fn pthread_mach_thread_np(thread: ::pthread_t) -> ::mach_port_t; pub fn pthread_from_mach_thread_np(port: ::mach_port_t) -> ::pthread_t; + pub fn pthread_create_from_mach_thread( + thread: *mut ::pthread_t, + attr: *const ::pthread_attr_t, + f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, + value: *mut ::c_void, + ) -> ::c_int; pub fn pthread_get_stackaddr_np(thread: ::pthread_t) -> *mut ::c_void; pub fn pthread_get_stacksize_np(thread: ::pthread_t) -> ::size_t; pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int; |