summaryrefslogtreecommitdiff
path: root/kern/spinlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'kern/spinlock.h')
-rw-r--r--kern/spinlock.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kern/spinlock.h b/kern/spinlock.h
index 1cc9b08f..f63c4e0b 100644
--- a/kern/spinlock.h
+++ b/kern/spinlock.h
@@ -51,8 +51,9 @@ spinlock_trylock(struct spinlock *lock)
thread_preempt_disable();
busy = spinlock_tryacquire(lock);
- if (busy)
+ if (busy) {
thread_preempt_enable();
+ }
return busy;
}