* thread.cc (pthread_cond::Signal): Release the condition access variable

correctly.
This commit is contained in:
Christopher Faylor 2001-06-14 23:53:27 +00:00
parent 5a5f43a0b9
commit 47132198ad
2 changed files with 11 additions and 1 deletions

View File

@ -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> 2001-06-14 Egor Duda <deo@logos-m.ru>
* fhandler.cc (fhandler_base::open): Set win32 access flags * fhandler.cc (fhandler_base::open): Set win32 access flags

View File

@ -442,7 +442,12 @@ pthread_cond::Signal ()
if (pthread_mutex_lock (&cond_access)) if (pthread_mutex_lock (&cond_access))
system_printf ("Failed to lock condition variable access mutex, this %0p\n", this); system_printf ("Failed to lock condition variable access mutex, this %0p\n", this);
if (!verifyable_object_isvalid (mutex, PTHREAD_MUTEX_MAGIC)) 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); PulseEvent (win32_obj_id);
if (pthread_mutex_unlock (&cond_access)) if (pthread_mutex_unlock (&cond_access))
system_printf ("Failed to unlock condition variable access mutex, this %0p\n", this); system_printf ("Failed to unlock condition variable access mutex, this %0p\n", this);