Allow holding to be called with interrupts enabled (for Mark Morrissey).
This commit is contained in:
parent
2c73068e82
commit
1d19081efb
|
@ -89,7 +89,11 @@ getcallerpcs(void *v, uint pcs[])
|
|||
int
|
||||
holding(struct spinlock *lock)
|
||||
{
|
||||
return lock->locked && lock->cpu == mycpu();
|
||||
int r;
|
||||
pushcli();
|
||||
r = lock->locked && lock->cpu == mycpu();
|
||||
popcli();
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue