macos: Remove need for TLS patch by storing TCB pointer in FS.

This commit is contained in:
squidbus 2024-09-01 02:22:42 -07:00
parent 7551f061ad
commit 9e5047947b
6 changed files with 103 additions and 28 deletions

View file

@ -18,6 +18,7 @@
#include "core/libraries/kernel/threads/threads.h"
#include "core/libraries/libs.h"
#include "core/linker.h"
#include "core/tls.h"
#ifdef _WIN64
#include <windows.h>
#else
@ -987,6 +988,7 @@ static void cleanup_thread(void* arg) {
destructor(value);
}
}
Core::SetTcbBase(nullptr);
thread->is_almost_done = true;
}