From 896d677f45e033aa4b88c32d0272c95e8e9be358 Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Tue, 22 May 2001 14:20:58 +0000 Subject: Also return TRUE for late arrived signals. Thanks to Steven Brooks 2001-05-22 Sebastian Wilhelmi * gthread-win32.c (g_cond_wait_internal): Also return TRUE for late arrived signals. Thanks to Steven Brooks for pointing out. --- gthread/ChangeLog | 4 ++++ gthread/gthread-win32.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'gthread') diff --git a/gthread/ChangeLog b/gthread/ChangeLog index b40f8c9e5..409f2749c 100644 --- a/gthread/ChangeLog +++ b/gthread/ChangeLog @@ -1,5 +1,9 @@ 2001-05-22 Sebastian Wilhelmi + * gthread-win32.c (g_cond_wait_internal): Also return TRUE for + late arrived signals. Thanks to Steven Brooks + for pointing out. + * gthread-impl.c (g_thread_init): Move the thread implementation initialization to before assigning GThreadFuncs, which now is just struct assigned and not memcpy'ed. Completed check for zero diff --git a/gthread/gthread-win32.c b/gthread/gthread-win32.c index 17b9eea52..6a45847f5 100644 --- a/gthread/gthread-win32.c +++ b/gthread/gthread-win32.c @@ -237,8 +237,11 @@ g_cond_wait_internal (GCond *cond, g_ptr_array_remove (cond->array, event); /* In the meantime we could have been signaled, so we must again - * wait for the signal, this time with no timeout, to reset it */ - win32_check_for_error (WAIT_FAILED != WaitForSingleObject (event, 0)); + * wait for the signal, this time with no timeout, to reset + * it. retval is set again to honour the late arrival of the + * signal */ + win32_check_for_error (WAIT_FAILED != + (retval = WaitForSingleObject (event, 0))); LeaveCriticalSection (&cond->lock); } -- cgit v1.2.3