@@ -112,6 +112,9 @@ pub type thread_latency_qos_policy_t = *mut thread_latency_qos_policy;
112112pub type thread_throughput_qos_policy_data_t = thread_throughput_qos_policy ;
113113pub type thread_throughput_qos_policy_t = * mut thread_throughput_qos_policy ;
114114
115+ pub type pthread_introspection_hook_t =
116+ extern "C" fn ( event : :: c_uint , thread : :: pthread_t , addr : * mut :: c_void , size : :: size_t ) ;
117+
115118pub type vm_statistics_t = * mut vm_statistics ;
116119pub type vm_statistics_data_t = vm_statistics ;
117120pub type vm_statistics64_t = * mut vm_statistics64 ;
@@ -2959,6 +2962,11 @@ pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x0020;
29592962pub const AT_SYMLINK_FOLLOW : :: c_int = 0x0040 ;
29602963pub const AT_REMOVEDIR : :: c_int = 0x0080 ;
29612964
2965+ pub const PTHREAD_INTROSPECTION_THREAD_CREATE : :: c_uint = 1 ;
2966+ pub const PTHREAD_INTROSPECTION_THREAD_START : :: c_uint = 2 ;
2967+ pub const PTHREAD_INTROSPECTION_THREAD_TERMINATE : :: c_uint = 3 ;
2968+ pub const PTHREAD_INTROSPECTION_THREAD_DESTROY : :: c_uint = 4 ;
2969+
29622970pub const TIOCMODG : :: c_ulong = 0x40047403 ;
29632971pub const TIOCMODS : :: c_ulong = 0x80047404 ;
29642972pub const TIOCM_LE : :: c_int = 0x1 ;
@@ -4851,6 +4859,21 @@ extern "C" {
48514859 policy : :: c_int ,
48524860 param : * const sched_param ,
48534861 ) -> :: c_int ;
4862+
4863+ // Available from Big Sur
4864+ pub fn pthread_introspection_hook_install (
4865+ hook : :: pthread_introspection_hook_t ,
4866+ ) -> :: pthread_introspection_hook_t ;
4867+ pub fn pthread_introspection_setspecific_np (
4868+ thread : :: pthread_t ,
4869+ key : :: pthread_key_t ,
4870+ value : * const :: c_void ,
4871+ ) -> :: c_int ;
4872+ pub fn pthread_introspection_getspecific_np (
4873+ thread : :: pthread_t ,
4874+ key : :: pthread_key_t ,
4875+ ) -> * mut :: c_void ;
4876+
48544877 pub fn thread_policy_set (
48554878 thread : thread_t ,
48564879 flavor : thread_policy_flavor_t ,
0 commit comments