X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..c910b4d9d2451126ae3917b931cd4390c11e1d52:/osfmk/kern/lock.h?ds=sidebyside diff --git a/osfmk/kern/lock.h b/osfmk/kern/lock.h index c1b07bde5..eb5ed024e 100644 --- a/osfmk/kern/lock.h +++ b/osfmk/kern/lock.h @@ -85,6 +85,21 @@ extern void mutex_init( mutex_t *mutex, unsigned short tag); +#ifdef i386 +extern void mutex_try_spin( + mutex_t *mutex); + +extern void mutex_lock_spin( + mutex_t *mutex); + +extern void mutex_convert_spin( + mutex_t *mutex); +#else +#define mutex_try_spin(l) mutex_try(l) +#define mutex_lock_spin(l) mutex_lock(l) +#define mutex_convert_spin(l) do {} while (0) +#endif + #endif /* MACH_KERNEL_PRIVATE */ extern mutex_t *mutex_alloc( @@ -102,7 +117,8 @@ extern void mutex_unlock( extern boolean_t mutex_try( mutex_t *mutex); -extern void mutex_pause(void); +extern void mutex_pause(uint32_t); +extern void mutex_yield(mutex_t *); #define MA_OWNED 0x01 #define MA_NOTOWNED 0x02