diff options
author | Christopher Faylor <me@cgf.cx> | 2001-06-14 23:53:27 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-06-14 23:53:27 +0000 |
commit | 47132198adf967c4dfd3f533e986cbe186315af1 (patch) | |
tree | 537ba426337357727b6ba7076c87f32469571af2 | |
parent | 5a5f43a0b954df170d07390a16b3483dbcede42f (diff) | |
download | newlib-47132198adf967c4dfd3f533e986cbe186315af1.zip newlib-47132198adf967c4dfd3f533e986cbe186315af1.tar.gz newlib-47132198adf967c4dfd3f533e986cbe186315af1.tar.bz2 |
* thread.cc (pthread_cond::Signal): Release the condition access variable
correctly.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/thread.cc | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e23c2d8..b1aeb07 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Fri June 15 09:25:00 Robert Collins <rbtcollins@hotmail.com> + + * thread.cc (pthread_cond::Signal): Release the condition access + variable correctly. + 2001-06-14 Egor Duda <deo@logos-m.ru> * fhandler.cc (fhandler_base::open): Set win32 access flags diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index 8940388..7ab45ae 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -442,7 +442,12 @@ pthread_cond::Signal () if (pthread_mutex_lock (&cond_access)) system_printf ("Failed to lock condition variable access mutex, this %0p\n", this); if (!verifyable_object_isvalid (mutex, PTHREAD_MUTEX_MAGIC)) - return; + { + if (pthread_mutex_unlock (&cond_access)) + system_printf ("Failed to unlock condition variable access mutex, this %0p\n", + this); + return; + } PulseEvent (win32_obj_id); if (pthread_mutex_unlock (&cond_access)) system_printf ("Failed to unlock condition variable access mutex, this %0p\n", this); |