summaryrefslogtreecommitdiffstats
path: root/src/libthread/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libthread/thread.c')
-rw-r--r--src/libthread/thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libthread/thread.c b/src/libthread/thread.c
index ee73f752..8a028aa4 100644
--- a/src/libthread/thread.c
+++ b/src/libthread/thread.c
@@ -166,11 +166,13 @@ _threadready(_Thread *t)
p = t->proc;
lock(&p->lock);
+ p->runrend.l = &p->lock;
addthread(&p->runqueue, t);
//print("%d wake for job %d->%d\n", time(0), getpid(), p->osprocid);
if(p != proc())
- _procwakeup(&p->runrend);
- unlock(&p->lock);
+ _procwakeupandunlock(&p->runrend);
+ else
+ unlock(&p->lock);
}
int