diff options
Diffstat (limited to 'kern/thread.h')
-rw-r--r-- | kern/thread.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kern/thread.h b/kern/thread.h index 4c7ef507..0702e1b4 100644 --- a/kern/thread.h +++ b/kern/thread.h @@ -406,14 +406,16 @@ extern void thread_unfreeze( /* Shall be taken at splsched only */ #ifdef MACH_LDEBUG -#define thread_lock(th) do { \ +#define thread_lock(th) \ +MACRO_BEGIN \ assert_splsched(); \ simple_lock_nocheck(&(th)->lock); \ -} while (0) -#define thread_unlock(th) do { \ +MACRO_END +#define thread_unlock(th) \ +MACRO_BEGIN \ assert_splsched(); \ simple_unlock_nocheck(&(th)->lock); \ -} while (0) +MACRO_END #else #define thread_lock(th) simple_lock_nocheck(&(th)->lock) #define thread_unlock(th) simple_unlock_nocheck(&(th)->lock) |