turnstile fixes

This commit is contained in:
2026-10-22 01:34:45 +02:00
parent dbb543de66
commit b83f1fe6d9
10 changed files with 419 additions and 82 deletions
+2
View File
@@ -68,6 +68,8 @@ static void mutex_lock_slow(mutex_t* mutex, uintptr_t self) {
// Before the scheduler is up, nobody can be preempted while holding a lock. Just keep spinning.
if (self == MUTEX_ANON_OWNER || owner == MUTEX_ANON_OWNER) {
spins = 0;
arch_cpu_pause();
word = atomic_load(mutex, ATOMIC_RELAXED);
continue;
}