* mono-semaphore.c: set EINTR on windows too.
svn path=/trunk/mono/; revision=155091
+2010-04-08 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * mono-semaphore.c: set EINTR on windows too.
+
2010-04-01 Gonzalo Paniagua Javier <gonzalo@novell.com>
* mono-semaphore.c: patch from Robert Nagy that makes this work in
gboolean res;
res = WaitForSingleObjectEx (*sem, timeout_ms, alertable);
- if (!res)
+ switch (res) {
+ case WAIT_OBJECT_0:
+ return 0;
+ case WAIT_IO_COMPLETION:
+ errno = EINTR;
+ return -1;
+ // WAIT_TIMEOUT and WAIT_FAILED
+ default:
return -1;
- return 0;
+ }
}
int