diff options
author | Robert Collins <rbtcollins@hotmail.com> | 2001-09-30 18:47:21 +0400 |
---|---|---|
committer | Robert Collins <rbtcollins@hotmail.com> | 2001-09-30 18:47:21 +0400 |
commit | e6b9398b2aed96a6d121762fd6e17fbcb1d5f25f (patch) | |
tree | 7927231b170365782fccef17f1dcea851e30ec07 /winsup | |
parent | ca3e514a1e4f8aa39d208b3d00434e801539f36c (diff) |
Merged changes from HEAD
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/thread.cc | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index bc5efb631..9974fc3a1 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -101,6 +101,11 @@ Tue Sep 25 16:22:00 2001 Robert Collins <rbtcollins@hotmail.com> * include/sys/ipc.h: New file. * include/sys/shm.h: New file. +Mon Oct 1 00:34:00 2001 Robert Collins <rbtcollins@hotmail.com> + + * thread.cc (pthread_cond_dowait): Hopefully eliminate a race on multiple thread + wakeups. + Sat Sep 29 18:26:00 2001 Robert Collins <rbtcollins@hotmail.com> * pthread.cc (pthread_cond_timedwait): Deleted - exported from thread.cc. diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index c952bd774..8b6f1b6d6 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -1773,8 +1773,8 @@ __pthread_cond_dowait (pthread_cond_t *cond, pthread_mutex_t *mutex, bool last = false; if (InterlockedDecrement (&((*cond)->waiting)) == 0) last = true; - (*cond)->mutex->Lock (); - if (last) + (*themutex)->Lock (); + if (last == true) (*cond)->mutex = NULL; if (pthread_mutex_lock (&(*cond)->cond_access)) system_printf ("Failed to lock condition variable access mutex, this %0p\n", *cond); |