[glib/wip/mutexes] gthread-win32: trivial condition change



commit 8c9cee38c91d69e925cb3922301c5046c61dd682
Author: Ryan Lortie <desrt desrt ca>
Date:   Tue Sep 20 00:05:34 2011 -0400

    gthread-win32: trivial condition change
    
    Make another do-nothing change to the SRWLock emulation.

 glib/gthread-win32.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
index 1bc6364..89d8f11 100644
--- a/glib/gthread-win32.c
+++ b/glib/gthread-win32.c
@@ -585,7 +585,10 @@ g_thread_xp_TryAcquireSRWLockExclusive (gpointer mutex)
 {
   GThreadSRWLock *lock = g_thread_xp_get_srwlock (mutex);
 
-  return TryEnterCriticalSection (&lock->writer_lock);
+  if (!TryEnterCriticalSection (&lock->writer_lock))
+    return FALSE;
+
+  return TRUE;
 }
 
 static void __stdcall



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]