X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..fe8ab488e9161c46dd9885d58fc52996dc0249ff:/osfmk/kern/simple_lock.h diff --git a/osfmk/kern/simple_lock.h b/osfmk/kern/simple_lock.h index 4c9c7b31c..c1a191adb 100644 --- a/osfmk/kern/simple_lock.h +++ b/osfmk/kern/simple_lock.h @@ -102,25 +102,41 @@ extern unsigned int hw_lock_held( __BEGIN_DECLS extern uint32_t hw_atomic_add( - uint32_t *dest, + volatile uint32_t *dest, uint32_t delt); extern uint32_t hw_atomic_sub( - uint32_t *dest, + volatile uint32_t *dest, uint32_t delt); extern uint32_t hw_atomic_or( - uint32_t *dest, + volatile uint32_t *dest, uint32_t mask); extern uint32_t hw_atomic_and( - uint32_t *dest, + volatile uint32_t *dest, + uint32_t mask); + +/* + * Variant of hw_atomic_or which doesn't return a value; potentially + * more efficient on some platforms. + */ +extern void hw_atomic_or_noret( + volatile uint32_t *dest, + uint32_t mask); +/* + * Variant of hw_atomic_and which doesn't return a value; potentially + * more efficient on some platforms. + */ + +extern void hw_atomic_and_noret( + volatile uint32_t *dest, uint32_t mask); extern uint32_t hw_compare_and_store( uint32_t oldval, uint32_t newval, - uint32_t *dest); + volatile uint32_t *dest); extern void hw_queue_atomic( unsigned int *anchor, @@ -166,8 +182,6 @@ __END_DECLS #define simple_unlock(l) usimple_unlock(l) #define simple_lock_try(l) usimple_lock_try(l) #define simple_lock_addr(l) (&(l)) -#define thread_sleep_simple_lock(l, e, i) \ - thread_sleep_usimple_lock((l), (e), (i)) #endif /* !defined(simple_lock_init) */ #endif /*!_KERN_SIMPLE_LOCK_H_*/