From b10edca40b871ca7e9ac0e09a5cf0ae8feac3311 Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Fri, 23 Feb 2024 08:14:10 +0000 Subject: kern: Use _nocheck variants of locks taken at splsched() Fixes assertion errors when LDEBUG is compiled in. Message-ID: <20240223081404.458062-1-damien@zamaudio.com> --- kern/machine.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'kern/machine.c') diff --git a/kern/machine.c b/kern/machine.c index f757d146..a350fad4 100644 --- a/kern/machine.c +++ b/kern/machine.c @@ -176,7 +176,8 @@ processor_request_action( * get at processor state. */ pset = processor->processor_set; - simple_lock(&pset->idle_lock); + assert_splsched(); + simple_lock_nocheck(&pset->idle_lock); /* * If the processor is dispatching, let it finish - it will set its @@ -228,7 +229,8 @@ processor_request_action( panic("processor_request_action: bad state"); } simple_unlock(&action_lock); - simple_unlock(&pset->idle_lock); + assert_splsched(); + simple_unlock_nocheck(&pset->idle_lock); thread_wakeup((event_t)&action_queue); } -- cgit v1.2.3