summaryrefslogtreecommitdiff
path: root/src/inc/tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inc/tls.h')
-rw-r--r--src/inc/tls.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/inc/tls.h b/src/inc/tls.h
index 05e50575f4..55f74892bb 100644
--- a/src/inc/tls.h
+++ b/src/inc/tls.h
@@ -15,13 +15,19 @@
#ifdef FEATURE_IMPLICIT_TLS
#ifdef _WIN64
-#define OFFSETOF__TLS__tls_CurrentThread 0x08
-#define OFFSETOF__TLS__tls_EETlsData 0x18
-#else
-#define OFFSETOF__TLS__tls_CurrentThread 0x04
-#define OFFSETOF__TLS__tls_EETlsData 0x0c
+#ifndef _DEBUG
+#define OFFSETOF__TLS__tls_ThreadLocalInfo 0x10
+#else // _DEBUG
+#define OFFSETOF__TLS__tls_ThreadLocalInfo 0x08
+#endif // _DEBUG
+#else // _WIN64
+#define OFFSETOF__TLS__tls_ThreadLocalInfo 0x04
#endif // _WIN64
+#define OFFSETOF__TLS__tls_CurrentThread (OFFSETOF__TLS__tls_ThreadLocalInfo+0x0)
+#define OFFSETOF__TLS__tls_EETlsData (OFFSETOF__TLS__tls_CurrentThread+2*sizeof(void*))
+
+
#ifdef _TARGET_WIN64_
#define WINNT_OFFSETOF__TEB__ThreadLocalStoragePointer 0x58
#else