about summary refs log tree commit diff stats
path: root/src/libtools/threads32.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2025-10-15 20:52:16 +0200
committerptitSeb <sebastien.chev@gmail.com>2025-10-15 20:52:16 +0200
commitd0045b158b30434c2077693d970e2167a1089e84 (patch)
treeb2951427e4870055cf79f6388d9755a227e843f7 /src/libtools/threads32.c
parent1d4a9e8863d7e32f0bb1472674a94f05df1409b5 (diff)
downloadbox64-d0045b158b30434c2077693d970e2167a1089e84.tar.gz
box64-d0045b158b30434c2077693d970e2167a1089e84.zip
Some Segments/Selector handling refactoring , removing some pthread_getspecific use
Diffstat (limited to 'src/libtools/threads32.c')
-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