Cosmetic fixes in spinlock

This commit is contained in:
Imbus 2025-06-26 06:19:58 +02:00
parent f1f480251c
commit f48e74bebe

View file

@ -58,8 +58,8 @@ void acquire(struct spinlock *lk) {
panic("acquire"); panic("acquire");
// Spin until aquired. See file header for details // Spin until aquired. See file header for details
while (__sync_lock_test_and_set(&lk->locked, 1) != 0) { while (__sync_lock_test_and_set(&lk->locked, 1) != 0);
}
__sync_synchronize(); // No loads/stores after this point __sync_synchronize(); // No loads/stores after this point
// Record info about lock acquisition for holding() and debugging. // Record info about lock acquisition for holding() and debugging.