diff options
author | Thomas Pfaff <tpfaff@gmx.net> | 2003-03-18 19:49:38 +0000 |
---|---|---|
committer | Thomas Pfaff <tpfaff@gmx.net> | 2003-03-18 19:49:38 +0000 |
commit | f592b05df1c4aece7a0a2dbe91163b95ca0de80e (patch) | |
tree | 487099b8c3da29d6e01bf022701718dd09e089ff /winsup/cygwin/thread.h | |
parent | 0bad7c2e26b90c872f9ed1dabfd0b28054c63dee (diff) | |
download | cygnal-f592b05df1c4aece7a0a2dbe91163b95ca0de80e.tar.gz cygnal-f592b05df1c4aece7a0a2dbe91163b95ca0de80e.tar.bz2 cygnal-f592b05df1c4aece7a0a2dbe91163b95ca0de80e.zip |
* thread.h (pthread_cond::ExitingWait): Remove.
(pthread_cond::mutex): Ditto.
(pthread_cond::cond_access): Ditto.
(pthread_cond::win32_obj_id): Ditto.
(pthread_cond::TimedWait): Ditto.
(pthread_cond::BroadCast): Ditto.
(pthread_cond::Signal): Ditto.
(pthread_cond::waiting): Change type to unsigned long.
(pthread_cond::pending): New member.
(pthread_cond::semWait): Ditto.
(pthread_cond::mtxIn): Ditto.
(pthread_cond::mtxOut): Ditto.
(pthread_cond::mtxCond): Ditto.
(pthread_cond::UnBlock): New method.
(pthread_cond::Wait): Ditto.
* thread.cc: Update list of cancellation points.
(pthread_cond::pthread_cond): Rewrite.
(pthread_cond::~pthread_cond): Ditto.
(pthread_cond::TimedWait): Remove.
(pthread_cond::BroadCast): Ditto.
(pthread_cond::Signal): Ditto.
(pthread_cond::UnBlock): Implement.
(pthread_cond::Wait): Ditto.
(pthread_cond::fixup_after_fork): Rewrite.
(pthread_mutex::fixup_after_fork): Remove DETECT_BAD_APP
conditional.
(__pthread_cond_broadcast): Just return 0 if the condition is
not initialized. Call pthread_cond::UnBlock to release blocked
threads.
(__pthread_cond_signal): Ditto.
(__pthread_cond__dowait): Rewrite.
(pthread_cond_timedwait): Add pthread_testcancel call. Fix
waitlength calculation.
(pthread_cond_wait): Add pthread_testcancel call.
Diffstat (limited to 'winsup/cygwin/thread.h')
-rw-r--r-- | winsup/cygwin/thread.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h index bd911bd49..1f1afa19c 100644 --- a/winsup/cygwin/thread.h +++ b/winsup/cygwin/thread.h @@ -494,16 +494,20 @@ public: static int init (pthread_cond_t *, const pthread_condattr_t *); int shared; - LONG waiting; - LONG ExitingWait; - pthread_mutex *mutex; - /* to allow atomic behaviour for cond_broadcast */ - pthread_mutex_t cond_access; - HANDLE win32_obj_id; + + unsigned long waiting; + unsigned long pending; + HANDLE semWait; + + pthread_mutex mtxIn; + pthread_mutex mtxOut; + + pthread_mutex_t mtxCond; + class pthread_cond * next; - int TimedWait (DWORD dwMilliseconds); - void BroadCast (); - void Signal (); + + void UnBlock (const bool all); + int Wait (pthread_mutex_t mutex, DWORD dwMilliseconds = INFINITE); void fixup_after_fork (); pthread_cond (pthread_condattr *); |