projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix sporadic hang in Mono.Debugger.Soft test suite on Windows.
[mono.git]
/
mono
/
utils
/
mono-os-semaphore.h
diff --git
a/mono/utils/mono-os-semaphore.h
b/mono/utils/mono-os-semaphore.h
index f766529201e3426bf1349b2f3020ad39d9a54932..0f8984ef9d9d2ef19f7a371feeb0726799351f0f 100644
(file)
--- a/
mono/utils/mono-os-semaphore.h
+++ b/
mono/utils/mono-os-semaphore.h
@@
-31,8
+31,7
@@
#elif !defined(HOST_WIN32) && defined(HAVE_SEMAPHORE_H)
#include <semaphore.h>
#else
#elif !defined(HOST_WIN32) && defined(HAVE_SEMAPHORE_H)
#include <semaphore.h>
#else
-#include <winsock2.h>
-#include <windows.h>
+#include <mono/utils/mono-os-wait.h>
#endif
#define MONO_HAS_SEMAPHORES 1
#endif
#define MONO_HAS_SEMAPHORES 1
@@
-318,9
+317,9
@@
mono_os_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, MonoSemFlags flags)
BOOL res;
retry:
BOOL res;
retry:
- res =
WaitForSingleObjectE
x (*sem, timeout_ms, flags & MONO_SEM_FLAGS_ALERTABLE);
+ res =
mono_win32_wait_for_single_object_e
x (*sem, timeout_ms, flags & MONO_SEM_FLAGS_ALERTABLE);
if (G_UNLIKELY (res != WAIT_OBJECT_0 && res != WAIT_IO_COMPLETION && res != WAIT_TIMEOUT))
if (G_UNLIKELY (res != WAIT_OBJECT_0 && res != WAIT_IO_COMPLETION && res != WAIT_TIMEOUT))
- g_error ("%s:
WaitForSingleObjectE
x failed with error %d", __func__, GetLastError ());
+ g_error ("%s:
mono_win32_wait_for_single_object_e
x failed with error %d", __func__, GetLastError ());
if (res == WAIT_IO_COMPLETION && !(flags & MONO_SEM_FLAGS_ALERTABLE))
goto retry;
if (res == WAIT_IO_COMPLETION && !(flags & MONO_SEM_FLAGS_ALERTABLE))
goto retry;