core: Fix CPU patch stack issues

This commit is contained in:
squidbus 2024-08-30 20:47:07 -07:00
parent 6080066f75
commit 61db246c5e
4 changed files with 14 additions and 25 deletions

View file

@ -986,15 +986,14 @@ static void cleanup_thread(void* arg) {
destructor(value);
}
}
Core::CleanupThreadPatchStack();
thread->is_almost_done = true;
}
static void* run_thread(void* arg) {
auto* thread = static_cast<ScePthread>(arg);
Common::SetCurrentThreadName(thread->name.c_str());
auto* linker = Common::Singleton<Core::Linker>::Instance();
Core::InitializeThreadPatchStack();
auto* linker = Common::Singleton<Core::Linker>::Instance();
linker->InitTlsForThread(false);
void* ret = nullptr;
g_pthread_self = thread;