libc/new/apple/libpthread/pthread_/
introspection.rs1use crate::prelude::*;
6pub use crate::pthread_::pthread::*;
7
8c_enum! {
9 #[repr(c_uint)]
10 pub enum #anon {
11 pub PTHREAD_INTROSPECTION_THREAD_CREATE = 1,
12 pub PTHREAD_INTROSPECTION_THREAD_START,
13 pub PTHREAD_INTROSPECTION_THREAD_TERMINATE,
14 pub PTHREAD_INTROSPECTION_THREAD_DESTROY,
15 }
16}
17
18pub type pthread_introspection_hook_t =
19 extern "C" fn(event: c_uint, thread: pthread_t, addr: *mut c_void, size: size_t);
20
21extern "C" {
22 pub fn pthread_introspection_hook_install(
24 hook: pthread_introspection_hook_t,
25 ) -> pthread_introspection_hook_t;
26 pub fn pthread_introspection_setspecific_np(
27 thread: pthread_t,
28 key: pthread_key_t,
29 value: *const c_void,
30 ) -> c_int;
31
32 pub fn pthread_introspection_getspecific_np(
33 thread: pthread_t,
34 key: pthread_key_t,
35 ) -> *mut c_void;
36}