about summary refs log tree commit diff stats
path: root/src/libtools/threads.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-09-10 15:10:28 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-09-10 15:10:28 +0200
commit7794a623aa27351b12a50fe9bf9f92ddac10d512 (patch)
treeae816a0d7f5094fc2899db81486f854886628643 /src/libtools/threads.c
parent0443edc03481221ab2ebe100319ab23dc193150f (diff)
downloadbox64-7794a623aa27351b12a50fe9bf9f92ddac10d512.tar.gz
box64-7794a623aa27351b12a50fe9bf9f92ddac10d512.zip
[BOX32] Fix and simplified 32bits threads handling
Diffstat (limited to 'src/libtools/threads.c')
-rw-r--r--src/libtools/threads.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/libtools/threads.c b/src/libtools/threads.c
index da514e43..f51f95c6 100644
--- a/src/libtools/threads.c
+++ b/src/libtools/threads.c
@@ -134,19 +134,8 @@ static void emuthread_destroy(void* p)
 	emuthread_t *et = (emuthread_t*)p;
 	if(!et)
 		return;
-	// check tlsdata
-	/*void* ptr;
-	if (my_context && (ptr = pthread_getspecific(my_context->tlskey)) != NULL)
-        free_tlsdatasize(ptr);*/
-	// free x64emu
-	#ifdef BOX32
-	/*if(box64_is32bits && !et->join)	// not removing  hash key from old pthread_t
-		to_hash_d(et->self);*/
-	#endif
-	if(et) {
-		FreeX64Emu(&et->emu);
-		box_free(et);
-	}
+	FreeX64Emu(&et->emu);
+	box_free(et);
 }
 
 static void emuthread_cancel(void* p)
@@ -188,7 +177,6 @@ void thread_set_emu(x64emu_t* emu)
 	#ifdef BOX32
 	if(box64_is32bits) {
 		et->self = (uintptr_t)pthread_self();
-		et->hself = to_hash(et->self);
 	}
 	#endif
 	pthread_setspecific(thread_key, et);