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/pthread.c | |
| parent | 815552b9ed41df2f20892f6467dd47f91f93aca1 (diff) | |
add _procwakeupandunlock
to help ease locking contention
on Linux 2.4.
Diffstat (limited to 'src/libthread/pthread.c')
| -rw-r--r-- | src/libthread/pthread.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libthread/pthread.c b/src/libthread/pthread.c index fcc309b7..38eb7d78 100644 --- a/src/libthread/pthread.c +++ b/src/libthread/pthread.c @@ -67,6 +67,16 @@ _procwakeup(_Procrendez *r) } } +void +_procwakeupandunlock(_Procrendez *r) +{ + if(r->asleep){ + r->asleep = 0; + pthread_cond_signal(&r->cond); + } + unlock(&r->l); +} + static void startprocfn(void *v) { |