Merge pull request #685 from squidbus/patch-fixes

core: Fix CPU patch stack issues
This commit is contained in:
georgemoralis 2024-08-31 23:43:26 +03:00 committed by GitHub
commit 3abc7d6b43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 25 deletions

View file

@ -987,15 +987,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;