summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r--src/corelib/thread/qthread_win.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 1a4b41fee4..32e8a52a28 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -69,6 +69,30 @@
#ifndef QT_NO_THREAD
QT_BEGIN_NAMESPACE
+#ifdef Q_OS_WINRT
+inline DWORD qWinRTTlsAlloc() {
+ return FlsAlloc(0);
+}
+
+inline bool qWinRTTlsFree(DWORD dwTlsIndex) {
+ return FlsFree(dwTlsIndex);
+}
+
+inline LPVOID qWinRTTlsGetValue(DWORD dwTlsIndex) {
+ return FlsGetValue(dwTlsIndex);
+}
+
+inline bool qWinRTTlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue) {
+ return FlsSetValue(dwTlsIndex, lpTlsValue);
+}
+
+#define TlsAlloc qWinRTTlsAlloc
+#define TlsFree qWinRTTlsFree
+#define TlsSetValue qWinRTTlsSetValue
+#define TlsGetValue qWinRTTlsGetValue
+
+#endif // Q_OS_WINRT
+
void qt_watch_adopted_thread(const HANDLE adoptedThreadHandle, QThread *qthread);
DWORD WINAPI qt_adopted_thread_watcher_function(LPVOID);