aboutsummaryrefslogtreecommitdiff
path: root/src/libthread
diff options
context:
space:
mode:
Diffstat (limited to 'src/libthread')
-rw-r--r--src/libthread/thread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libthread/thread.c b/src/libthread/thread.c
index 8a028aa4..120e6514 100644
--- a/src/libthread/thread.c
+++ b/src/libthread/thread.c
@@ -344,9 +344,10 @@ threadqunlock(QLock *l, ulong pc)
{
lock(&l->l);
//print("qlock unlock %p @%#x by %p (owner %p)\n", l, pc, (*threadnow)(), l->owner);
- if(l->owner != (*threadnow)()){
+ if(l->owner == 0){
fprint(2, "%s: qunlock pc=0x%lux owner=%p self=%p oops\n",
argv0, pc, l->owner, (*threadnow)());
+ abort();
}
if((l->owner = l->waiting.head) != nil){
delthread(&l->waiting, l->owner);