Skip to content

Commit 0b86d03

Browse files
committedAug 30, 2018
Because sleeplocks replaced B_BUSY the holding test can
be more specific (thanks Mark Morrissey)
1 parent 0b6f4c0 commit 0b86d03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎sleeplock.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ holdingsleep(struct sleeplock *lk)
4747
int r;
4848

4949
acquire(&lk->lk);
50-
r = lk->locked;
50+
r = lk->locked && (lk->pid == myproc()->pid);
5151
release(&lk->lk);
5252
return r;
5353
}

0 commit comments

Comments
 (0)