@@ -123,6 +123,11 @@ pub type pthread_introspection_hook_t =
123
123
extern "C" fn ( event : :: c_uint , thread : :: pthread_t , addr : * mut :: c_void , size : :: size_t ) ;
124
124
pub type pthread_jit_write_callback_t = :: Option < extern "C" fn ( ctx : * mut :: c_void ) -> :: c_int > ;
125
125
126
+ pub type os_clockid_t = u32 ;
127
+
128
+ pub type os_sync_wait_on_address_flags_t = u32 ;
129
+ pub type os_sync_wake_by_address_flags_t = u32 ;
130
+
126
131
pub type os_unfair_lock = os_unfair_lock_s ;
127
132
pub type os_unfair_lock_t = * mut os_unfair_lock ;
128
133
@@ -5422,6 +5427,15 @@ pub const VOL_CAP_INT_RENAME_SWAP: attrgroup_t = 0x00040000;
5422
5427
pub const VOL_CAP_INT_RENAME_EXCL : attrgroup_t = 0x00080000 ;
5423
5428
pub const VOL_CAP_INT_RENAME_OPENFAIL : attrgroup_t = 0x00100000 ;
5424
5429
5430
+ // os/clock.h
5431
+ pub const OS_CLOCK_MACH_ABSOLUTE_TIME : os_clockid_t = 32 ;
5432
+
5433
+ // os/os_sync_wait_on_address.h
5434
+ pub const OS_SYNC_WAIT_ON_ADDRESS_NONE : os_sync_wait_on_address_flags_t = 0x00000000 ;
5435
+ pub const OS_SYNC_WAIT_ON_ADDRESS_SHARED : os_sync_wait_on_address_flags_t = 0x00000001 ;
5436
+ pub const OS_SYNC_WAKE_BY_ADDRESS_NONE : os_sync_wake_by_address_flags_t = 0x00000000 ;
5437
+ pub const OS_SYNC_WAKE_BY_ADDRESS_SHARED : os_sync_wake_by_address_flags_t = 0x00000001 ;
5438
+
5425
5439
// <proc.h>
5426
5440
/// Process being created by fork.
5427
5441
pub const SIDL : u32 = 1 ;
@@ -5775,6 +5789,40 @@ extern "C" {
5775
5789
pub fn pthread_jit_write_freeze_callbacks_np ( ) ;
5776
5790
pub fn pthread_cpu_number_np ( cpu_number_out : * mut :: size_t ) -> :: c_int ;
5777
5791
5792
+ // Available starting with macOS 14.4.
5793
+ pub fn os_sync_wait_on_address (
5794
+ addr : * mut :: c_void ,
5795
+ value : u64 ,
5796
+ size : :: size_t ,
5797
+ flags : os_sync_wait_on_address_flags_t ,
5798
+ ) -> :: c_int ;
5799
+ pub fn os_sync_wait_on_address_with_deadline (
5800
+ addr : * mut :: c_void ,
5801
+ value : u64 ,
5802
+ size : :: size_t ,
5803
+ flags : os_sync_wait_on_address_flags_t ,
5804
+ clockid : os_clockid_t ,
5805
+ deadline : u64 ,
5806
+ ) -> :: c_int ;
5807
+ pub fn os_sync_wait_on_address_with_timeout (
5808
+ addr : * mut :: c_void ,
5809
+ value : u64 ,
5810
+ size : :: size_t ,
5811
+ flags : os_sync_wait_on_address_flags_t ,
5812
+ clockid : os_clockid_t ,
5813
+ timeout_ns : u64 ,
5814
+ ) -> :: c_int ;
5815
+ pub fn os_sync_wake_by_address_any (
5816
+ addr : * mut :: c_void ,
5817
+ size : :: size_t ,
5818
+ flags : os_sync_wake_by_address_flags_t ,
5819
+ ) -> :: c_int ;
5820
+ pub fn os_sync_wake_by_address_all (
5821
+ addr : * mut :: c_void ,
5822
+ size : :: size_t ,
5823
+ flags : os_sync_wake_by_address_flags_t ,
5824
+ ) -> :: c_int ;
5825
+
5778
5826
pub fn os_unfair_lock_lock ( lock : os_unfair_lock_t ) ;
5779
5827
pub fn os_unfair_lock_trylock ( lock : os_unfair_lock_t ) -> bool ;
5780
5828
pub fn os_unfair_lock_unlock ( lock : os_unfair_lock_t ) ;
0 commit comments