Allow holding to be called with interrupts enabled (for Mark Morrissey).
This commit is contained in:
parent
2c73068e82
commit
1d19081efb
1 changed files with 5 additions and 1 deletions
|
@ -89,7 +89,11 @@ getcallerpcs(void *v, uint pcs[])
|
||||||
int
|
int
|
||||||
holding(struct spinlock *lock)
|
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