aboutsummaryrefslogtreecommitdiff
path: root/kern/machine.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-15 10:59:42 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-15 10:59:42 +0100
commitca7b8ae031d9ce12139d96caedc5d1bd369feeca (patch)
tree5506dc516c95c7f6c065dd0d4e00ee69cd53eb3b /kern/machine.c
parentd3ef1ba20f7b6e1af5387c48d58da38cc55d3b79 (diff)
downloadgnumach-ca7b8ae031d9ce12139d96caedc5d1bd369feeca.tar.gz
gnumach-ca7b8ae031d9ce12139d96caedc5d1bd369feeca.tar.bz2
gnumach-ca7b8ae031d9ce12139d96caedc5d1bd369feeca.zip
smp: Fix more busy loops
We need to avoid the kernel optimizing away the reads from memory. Use a standard relaxing instruction for that.
Diffstat (limited to 'kern/machine.c')
-rw-r--r--kern/machine.c2
1 files changed, 1 insertions, 1 deletions
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.