Because sleeplocks replaced B_BUSY the holding test can
be more specific (thanks Mark Morrissey)
This commit is contained in:
parent
0b6f4c08b9
commit
0b86d03767
|
@ -47,7 +47,7 @@ holdingsleep(struct sleeplock *lk)
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
acquire(&lk->lk);
|
acquire(&lk->lk);
|
||||||
r = lk->locked;
|
r = lk->locked && (lk->pid == myproc()->pid);
|
||||||
release(&lk->lk);
|
release(&lk->lk);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue