Skip to content

Commit

Permalink
Because sleeplocks replaced B_BUSY the holding test can
Browse files Browse the repository at this point in the history
be more specific (thanks Mark Morrissey)
  • Loading branch information
kaashoek committed Aug 30, 2018
1 parent 0b6f4c0 commit 0b86d03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sleeplock.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ holdingsleep(struct sleeplock *lk)
int r;

acquire(&lk->lk);
r = lk->locked;
r = lk->locked && (lk->pid == myproc()->pid);
release(&lk->lk);
return r;
}
Expand Down

0 comments on commit 0b86d03

Please sign in to comment.