@@ -121,6 +121,11 @@ pub type pthread_introspection_hook_t =
121
121
extern "C" fn ( event : :: c_uint , thread : :: pthread_t , addr : * mut :: c_void , size : :: size_t ) ;
122
122
pub type pthread_jit_write_callback_t = :: Option < extern "C" fn ( ctx : * mut :: c_void ) -> :: c_int > ;
123
123
124
+ pub type os_clockid_t = u32 ;
125
+
126
+ pub type os_sync_wait_on_address_flags_t = u32 ;
127
+ pub type os_sync_wake_by_address_flags_t = u32 ;
128
+
124
129
pub type os_unfair_lock = os_unfair_lock_s ;
125
130
pub type os_unfair_lock_t = * mut os_unfair_lock ;
126
131
@@ -5441,6 +5446,15 @@ pub const VOL_CAP_INT_RENAME_SWAP: attrgroup_t = 0x00040000;
5441
5446
pub const VOL_CAP_INT_RENAME_EXCL : attrgroup_t = 0x00080000 ;
5442
5447
pub const VOL_CAP_INT_RENAME_OPENFAIL : attrgroup_t = 0x00100000 ;
5443
5448
5449
+ // os/clock.h
5450
+ pub const OS_CLOCK_MACH_ABSOLUTE_TIME : os_clockid_t = 32 ;
5451
+
5452
+ // os/os_sync_wait_on_address.h
5453
+ pub const OS_SYNC_WAIT_ON_ADDRESS_NONE : os_sync_wait_on_address_flags_t = 0x00000000 ;
5454
+ pub const OS_SYNC_WAIT_ON_ADDRESS_SHARED : os_sync_wait_on_address_flags_t = 0x00000001 ;
5455
+ pub const OS_SYNC_WAKE_BY_ADDRESS_NONE : os_sync_wake_by_address_flags_t = 0x00000000 ;
5456
+ pub const OS_SYNC_WAKE_BY_ADDRESS_SHARED : os_sync_wake_by_address_flags_t = 0x00000001 ;
5457
+
5444
5458
// <proc.h>
5445
5459
/// Process being created by fork.
5446
5460
pub const SIDL : u32 = 1 ;
@@ -5834,6 +5848,40 @@ extern "C" {
5834
5848
pub fn pthread_jit_write_freeze_callbacks_np ( ) ;
5835
5849
pub fn pthread_cpu_number_np ( cpu_number_out : * mut :: size_t ) -> :: c_int ;
5836
5850
5851
+ // Available starting with macOS 14.4.
5852
+ pub fn os_sync_wait_on_address (
5853
+ addr : * mut :: c_void ,
5854
+ value : u64 ,
5855
+ size : :: size_t ,
5856
+ flags : os_sync_wait_on_address_flags_t ,
5857
+ ) -> :: c_int ;
5858
+ pub fn os_sync_wait_on_address_with_deadline (
5859
+ addr : * mut :: c_void ,
5860
+ value : u64 ,
5861
+ size : :: size_t ,
5862
+ flags : os_sync_wait_on_address_flags_t ,
5863
+ clockid : os_clockid_t ,
5864
+ deadline : u64 ,
5865
+ ) -> :: c_int ;
5866
+ pub fn os_sync_wait_on_address_with_timeout (
5867
+ addr : * mut :: c_void ,
5868
+ value : u64 ,
5869
+ size : :: size_t ,
5870
+ flags : os_sync_wait_on_address_flags_t ,
5871
+ clockid : os_clockid_t ,
5872
+ timeout_ns : u64 ,
5873
+ ) -> :: c_int ;
5874
+ pub fn os_sync_wake_by_address_any (
5875
+ addr : * mut :: c_void ,
5876
+ size : :: size_t ,
5877
+ flags : os_sync_wake_by_address_flags_t ,
5878
+ ) -> :: c_int ;
5879
+ pub fn os_sync_wake_by_address_all (
5880
+ addr : * mut :: c_void ,
5881
+ size : :: size_t ,
5882
+ flags : os_sync_wake_by_address_flags_t ,
5883
+ ) -> :: c_int ;
5884
+
5837
5885
pub fn os_unfair_lock_lock ( lock : os_unfair_lock_t ) ;
5838
5886
pub fn os_unfair_lock_trylock ( lock : os_unfair_lock_t ) -> bool ;
5839
5887
pub fn os_unfair_lock_unlock ( lock : os_unfair_lock_t ) ;
0 commit comments