summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/thread
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/thread')
-rw-r--r--tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
index 7d041e69cb..ac8d433f96 100644
--- a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
+++ b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
@@ -49,9 +49,13 @@
#ifdef Q_OS_UNIX
#include <unistd.h>
#endif
-#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
-#include <windows.h>
-#define sleep(X) Sleep(X)
+#if defined(Q_OS_WIN)
+# include <qt_windows.h>
+# ifndef Q_OS_WINRT
+# define sleep(X) Sleep(X)
+# else
+# define sleep(X) WaitForSingleObjectEx(GetCurrentThread(), X, FALSE);
+# endif
#endif
//on solaris, threads that loop on the release bool variable