diff --git a/libc-test/build.rs b/libc-test/build.rs index 5376c46860d6d..3611ae092394b 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -232,6 +232,7 @@ fn test_apple(target: &str) { "netinet/tcp.h", "netinet/udp.h", "os/lock.h", + "os/signpost.h", "poll.h", "pthread.h", "pthread_spis.h", diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index 83cd77d9a23db..723541817468c 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -1003,6 +1003,14 @@ OFDEL OFILL OLD_TIME ONOEOT +OS_LOG_TYPE_DEBUG +OS_LOG_TYPE_DEFAULT +OS_LOG_TYPE_ERROR +OS_LOG_TYPE_FAULT +OS_LOG_TYPE_INFO +OS_SIGNPOST_EVENT +OS_SIGNPOST_INTERVAL_BEGIN +OS_SIGNPOST_INTERVAL_END OS_UNFAIR_LOCK_INIT OXTABS O_ASYNC @@ -1994,6 +2002,15 @@ open_memstream open_wmemstream openat openpty +os_log_create +os_log_t +os_log_type_t +os_log_type_enabled +os_signpost_enabled +os_signpost_id_generate +os_signpost_id_make_with_pointer +os_signpost_id_t +os_signpost_type_t os_unfair_lock os_unfair_lock_s os_unfair_lock_t diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index a9438ef57a3c2..1267b8045ef65 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -124,6 +124,11 @@ pub type pthread_jit_write_callback_t = ::Option ::os_log_t; + pub fn os_log_type_enabled(oslog: ::os_log_t, tpe: ::os_log_type_t) -> bool; + pub fn os_signpost_id_make_with_pointer( + log: ::os_log_t, + ptr: *const ::c_void, + ) -> ::os_signpost_id_t; + pub fn os_signpost_id_generate(log: ::os_log_t) -> ::os_signpost_id_t; + pub fn os_signpost_enabled(log: ::os_log_t) -> bool; + pub fn thread_policy_set( thread: thread_t, flavor: thread_policy_flavor_t,