summaryrefslogtreecommitdiff
path: root/spinlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'spinlock.c')
-rw-r--r--spinlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/spinlock.c b/spinlock.c
index 68cfbe9..281748a 100644
--- a/spinlock.c
+++ b/spinlock.c
@@ -23,7 +23,7 @@ initlock(struct spinlock *lk, char *name)
void
acquire(struct spinlock *lk)
{
- pushcli();
+ pushcli(); // disable interrupts to avoid deadlock.
if(holding(lk))
panic("acquire");