2010-07-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 16 Jul 2010 05:10:35 +0000 (05:10 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 16 Jul 2010 05:10:35 +0000 (05:10 -0000)
* mono-semaphore.c: fixes bug #622398 for real in OSX.
This was preventing the WSQ from working.

svn path=/trunk/mono/; revision=160469

mono/utils/ChangeLog
mono/utils/mono-semaphore.c

index 198e61b611f14e9c4e5ead5170706d07733f85d3..f45ee424f2618f01060f657a67cd5938cda5c81e 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * mono-semaphore.c: fixes bug #622398 for real in OSX.
+       This was preventing the WSQ from working.
+
 2010-07-02  Michael Hutchinson  <mhutchinson@novell.com>
 
        * mono-compiler.h: Add MONO_THREAD_VAR_OFFSET macro for s390x.
index 4aefaacd895b1285fe9d18d30cec7691e40ea31f..905430d282729b264ef2f7e684daedec6ff0151d 100644 (file)
@@ -69,7 +69,7 @@ mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable)
        }
 #else
        copy = ts;
-       while ((res = WAIT_BLOCK (sem, &ts) == -1) && errno == EINTR) {
+       while ((res = WAIT_BLOCK (sem, &ts)) == -1 && errno == EINTR) {
                struct timeval current;
                if (alertable)
                        return -1;
@@ -91,7 +91,7 @@ mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable)
                }
        }
 #endif
-       return res;
+       return (res != -1);
 }
 
 int