diff options
author | rsc <devnull@localhost> | 2005-01-06 23:43:42 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-01-06 23:43:42 +0000 |
commit | a0a331aad99bbca5a13fa4b69593061f29dc3a29 (patch) | |
tree | 1cba91b1f702a098a9c805fb3c876e9b372ba679 /src/libthread/thread.c | |
parent | 815552b9ed41df2f20892f6467dd47f91f93aca1 (diff) | |
download | plan9port-a0a331aad99bbca5a13fa4b69593061f29dc3a29.tar.gz plan9port-a0a331aad99bbca5a13fa4b69593061f29dc3a29.tar.bz2 plan9port-a0a331aad99bbca5a13fa4b69593061f29dc3a29.zip |
add _procwakeupandunlock
to help ease locking contention
on Linux 2.4.
Diffstat (limited to 'src/libthread/thread.c')
-rw-r--r-- | src/libthread/thread.c | 6 |
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 |