Because sleeplocks replaced B_BUSY the holding test can

be more specific (thanks Mark Morrissey)
This commit is contained in:
Frans Kaashoek 2018-08-30 11:57:46 -04:00
parent 0b6f4c08b9
commit 0b86d03767

View file

@ -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;
} }