add _procwakeupandunlock
to help ease locking contention on Linux 2.4.
This commit is contained in:
parent
815552b9ed
commit
a0a331aad9
5 changed files with 44 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue