From 8a49b0fd609ca347dbc8400af139c2b5e188f159 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 19 Feb 2024 00:58:00 +0100 Subject: Introduce and use assert_splsched() --- kern/thread.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kern/thread.h') diff --git a/kern/thread.h b/kern/thread.h index 21b25030..81d32924 100644 --- a/kern/thread.h +++ b/kern/thread.h @@ -399,11 +399,11 @@ extern void thread_unfreeze( /* Shall be taken at splsched only */ #ifdef MACH_LDEBUG #define thread_lock(th) do { \ - assert(splsched() == SPL7); \ + assert_splsched(); \ simple_lock_nocheck(&(th)->lock); \ } while (0) #define thread_unlock(th) do { \ - assert(splsched() == SPL7); \ + assert_splsched(); \ simple_unlock_nocheck(&(th)->lock); \ } while (0) #else -- cgit v1.2.3