diff options
author | mtm <mtm@FreeBSD.org> | 2003-05-24 01:02:16 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2003-05-24 01:02:16 +0000 |
commit | d8dec9f72fc70ddb0f6dc6547bc8207a1061187d (patch) | |
tree | f11e04b9224f329eceb1613758c12b79bd5a14cd /lib/libpthread/thread/thr_sig.c | |
parent | d2359553a8076cb6f2ae682cf7370193bb7d5781 (diff) | |
download | FreeBSD-src-d8dec9f72fc70ddb0f6dc6547bc8207a1061187d.zip FreeBSD-src-d8dec9f72fc70ddb0f6dc6547bc8207a1061187d.tar.gz |
Lock the cond queue (condition variables):
Access to the thread's flags and state is protected by
_thread_critical_enter/exit(). When a thread is signaled with a condition
its state must be protected by locking it and disabling
signals before it is taken of the waiters' queue.
Move the implementation of pthread_cond_signal() and pthread_cond_broadcast()
into one function, cond_signal(). Its behaviour is determined by the
last argument, int broadcast. If this is set to 1 it will remove all
waiters, otherwise it will wake up only the first waiter thread.
Remove an extraneous call to pthread_testcancel().
Approved by: re/blanket libthr
Diffstat (limited to 'lib/libpthread/thread/thr_sig.c')
0 files changed, 0 insertions, 0 deletions