aboutsummaryrefslogtreecommitdiff
path: root/kern/machine.c
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2024-02-23 08:14:10 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-02-23 14:00:56 +0100
commitb10edca40b871ca7e9ac0e09a5cf0ae8feac3311 (patch)
treee6fd002e111fd6fe9227e575f37c65d7b9a63852 /kern/machine.c
parentc5754fd61f08e8c1020cccbb9c7b875c33bd0a73 (diff)
downloadgnumach-b10edca40b871ca7e9ac0e09a5cf0ae8feac3311.tar.gz
gnumach-b10edca40b871ca7e9ac0e09a5cf0ae8feac3311.tar.bz2
gnumach-b10edca40b871ca7e9ac0e09a5cf0ae8feac3311.zip
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>
Diffstat (limited to 'kern/machine.c')
-rw-r--r--kern/machine.c6
1 files changed, 4 insertions, 2 deletions
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);
}