interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / vendor / libc / src / new / apple / libpthread / pthread_ / introspection.rs

36 lines · 1048 bytes Raw Blame History
1//! Header: `pthread/introspection.h`
2//!
3//! <https://github.com/apple-oss-distributions/libpthread/blob/main/include/pthread/introspection.h>
4
5use 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 // Available from Big Sur
23 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}