about summary refs log tree commit diff stats
path: root/src/libtools/threads32.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/libtools/threads32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libtools/threads32.c b/src/libtools/threads32.c
index ce5a4579..4d614b93 100755
--- a/src/libtools/threads32.c
+++ b/src/libtools/threads32.c
@@ -27,6 +27,7 @@
 #include "x64trace.h"
 #include "bridge.h"
 #include "threads32.h"
+#include "x64tls.h"
 #ifdef DYNAREC
 #include "dynablock.h"
 #endif
@@ -112,6 +113,7 @@ static void* pthread_routine(void* p)
 	et->hself = to_hash(et->self);
 	// setup callstack and run...
 	x64emu_t* emu = et->emu;
+	getTLSData(emu);
 	Push_32(emu, 0);	// PUSH 0 (backtrace marker: return address is 0)
 	Push_32(emu, 0);	// PUSH BP
 	R_EBP = R_ESP;	// MOV BP, SP