@@ -121,6 +121,9 @@ pub type pthread_introspection_hook_t =
121121 extern "C" fn ( event : :: c_uint , thread : :: pthread_t , addr : * mut :: c_void , size : :: size_t ) ;
122122pub type pthread_jit_write_callback_t = :: Option < extern "C" fn ( ctx : * mut :: c_void ) -> :: c_int > ;
123123
124+ pub type os_unfair_lock = os_unfair_lock_s ;
125+ pub type os_unfair_lock_t = * mut os_unfair_lock ;
126+
124127pub type vm_statistics_t = * mut vm_statistics ;
125128pub type vm_statistics_data_t = vm_statistics ;
126129pub type vm_statistics64_t = * mut vm_statistics64 ;
@@ -1295,6 +1298,10 @@ s_no_extra_traits! {
12951298 pub l2p_contigbytes: :: off_t,
12961299 pub l2p_devoffset: :: off_t,
12971300 }
1301+
1302+ pub struct os_unfair_lock_s {
1303+ _os_unfair_lock_opaque: u32 ,
1304+ }
12981305}
12991306
13001307impl siginfo_t {
@@ -2576,6 +2583,27 @@ cfg_if! {
25762583 l2p_devoffset. hash( state) ;
25772584 }
25782585 }
2586+ impl PartialEq for os_unfair_lock {
2587+ fn eq( & self , other: & os_unfair_lock) -> bool {
2588+ self . _os_unfair_lock_opaque == other. _os_unfair_lock_opaque
2589+ }
2590+ }
2591+
2592+ impl Eq for os_unfair_lock { }
2593+
2594+ impl :: fmt:: Debug for os_unfair_lock {
2595+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
2596+ f. debug_struct( "os_unfair_lock" )
2597+ . field( "_os_unfair_lock_opaque" , & self . _os_unfair_lock_opaque)
2598+ . finish( )
2599+ }
2600+ }
2601+
2602+ impl :: hash:: Hash for os_unfair_lock {
2603+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
2604+ self . _os_unfair_lock_opaque. hash( state) ;
2605+ }
2606+ }
25792607 }
25802608}
25812609
@@ -3863,6 +3891,10 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
38633891 __opaque : [ 0 ; __PTHREAD_RWLOCK_SIZE__] ,
38643892} ;
38653893
3894+ pub const OS_UNFAIR_LOCK_INIT : os_unfair_lock = os_unfair_lock {
3895+ _os_unfair_lock_opaque : 0 ,
3896+ } ;
3897+
38663898pub const MINSIGSTKSZ : :: size_t = 32768 ;
38673899pub const SIGSTKSZ : :: size_t = 131072 ;
38683900
@@ -5221,6 +5253,12 @@ extern "C" {
52215253 pub fn pthread_jit_write_freeze_callbacks_np ( ) ;
52225254 pub fn pthread_cpu_number_np ( cpu_number_out : * mut :: size_t ) -> :: c_int ;
52235255
5256+ pub fn os_unfair_lock_lock ( lock : os_unfair_lock_t ) ;
5257+ pub fn os_unfair_lock_trylock ( lock : os_unfair_lock_t ) -> bool ;
5258+ pub fn os_unfair_lock_unlock ( lock : os_unfair_lock_t ) ;
5259+ pub fn os_unfair_lock_assert_owner ( lock : os_unfair_lock_t ) ;
5260+ pub fn os_unfair_lock_assert_not_owner ( lock : os_unfair_lock_t ) ;
5261+
52245262 pub fn thread_policy_set (
52255263 thread : thread_t ,
52265264 flavor : thread_policy_flavor_t ,
0 commit comments