From ca7b8ae031d9ce12139d96caedc5d1bd369feeca Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 15 Feb 2023 10:59:42 +0100 Subject: smp: Fix more busy loops We need to avoid the kernel optimizing away the reads from memory. Use a standard relaxing instruction for that. --- kern/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kern/machine.c') diff --git a/kern/machine.c b/kern/machine.c index e8c9912e..bf9677c9 100644 --- a/kern/machine.c +++ b/kern/machine.c @@ -172,7 +172,7 @@ processor_request_action( * state to running very soon. */ while (*(volatile int *)&processor->state == PROCESSOR_DISPATCHING) - continue; + cpu_pause(); /* * Now lock the action queue and do the dirty work. -- cgit v1.2.3