diff options
author | Sergei Golubchik <serg@mysql.com> | 2008-10-21 16:10:04 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mysql.com> | 2008-10-21 16:10:04 +0200 |
commit | c6a51b044739d6c1b0406ba7561334b1c373a022 (patch) | |
tree | b11c4eadb398730ab0cee5bf0eb69ecd7168a0c7 /mysys/my_wincond.c | |
parent | ade71b252276f8cd3de2b325074ef1dfb5694daf (diff) | |
download | mariadb-git-c6a51b044739d6c1b0406ba7561334b1c373a022.tar.gz |
fixes for hanging waiting_thread-t.c on windows
mysys/my_wincond.c:
race condition: block gate could be left open forever, if cond_broadcast
was done right after the last thread left WaitForMultipleObjects() on timeout
mysys/thr_rwlock.c:
make rwlocks behave similar to their distant linux/solaris relatives
Diffstat (limited to 'mysys/my_wincond.c')
-rw-r--r-- | mysys/my_wincond.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/my_wincond.c b/mysys/my_wincond.c index d1b07b61408..c9bc33df8c4 100644 --- a/mysys/my_wincond.c +++ b/mysys/my_wincond.c @@ -126,7 +126,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, EnterCriticalSection(&cond->lock_waiting); cond->waiting--; - if (cond->waiting == 0 && result == (WAIT_OBJECT_0+BROADCAST)) + if (cond->waiting == 0) { /* We're the last waiter to be notified or to stop waiting, so |