X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/e3027f41d0120b4278cca462f397b6619dcd9ac5..0b4e3aa066abc0728aacb4bbeb86f53f9737156e:/osfmk/kern/lock.h diff --git a/osfmk/kern/lock.h b/osfmk/kern/lock.h index 65cd1f18f..e1143bf86 100644 --- a/osfmk/kern/lock.h +++ b/osfmk/kern/lock.h @@ -150,32 +150,28 @@ typedef struct { #define decl_mutex_data(class,name) class mutex_t name; #define mutex_addr(m) (&(m)) -#if MACH_LDEBUG -#define mutex_held(m) (hw_lock_held(&((m)->locked)) && \ - ((m)->thread == (int)current_thread())) -#else /* MACH_LDEBUG */ -#define mutex_held(m) hw_lock_held(&((m)->locked)) -#endif /* MACH_LDEBUG */ +extern void mutex_init (mutex_t*, etap_event_t); +extern void mutex_lock_wait (mutex_t*); +extern void mutex_unlock_wakeup (mutex_t*); +extern void interlock_unlock (hw_lock_t); #else /* MACH_KERNEL_PRIVATE */ typedef struct __mutex__ mutex_t; -extern boolean_t mutex_held(mutex_t*); + +/* going away */ +extern void _mutex_lock (mutex_t*); +extern boolean_t _mutex_try (mutex_t*); #endif /* !MACH_KERNEL_PRIVATE */ extern mutex_t *mutex_alloc (etap_event_t); extern void mutex_free (mutex_t*); - -extern void mutex_init (mutex_t*, etap_event_t); -extern void _mutex_lock (mutex_t*); +extern void mutex_lock (mutex_t*); extern void mutex_unlock (mutex_t*); -extern boolean_t _mutex_try (mutex_t*); +extern boolean_t mutex_try (mutex_t*); -extern void mutex_lock_wait (mutex_t*); -extern void mutex_unlock_wakeup (mutex_t*); extern void mutex_pause (void); -extern void interlock_unlock (hw_lock_t); /* * The general lock structure. Provides for multiple readers,