Fix multi-threading crashes on shutdown with Linux and Blackberry. Fixes issue #3133 -- thanks @unknown

This commit is contained in:
Sacha 2013-10-17 17:39:04 +10:00
parent 4f6b0225ed
commit fafe4fc4f2
2 changed files with 2 additions and 0 deletions

View File

@ -469,6 +469,7 @@ void __IoInit() {
if (ioManagerThreadEnabled) {
Core_ListenShutdown(&__IoWakeManager);
ioManagerThread = new std::thread(&__IoManagerThread);
ioManagerThread->detach();
}
__KernelRegisterWaitTypeFuncs(WAITTYPE_ASYNCIO, __IoAsyncBeginCallback, __IoAsyncEndCallback);

View File

@ -293,6 +293,7 @@ bool PSP_Init(const CoreParameter &coreParam, std::string *error_string) {
Core_ListenShutdown(System_Wake);
CPU_SetState(CPU_THREAD_PENDING);
cpuThread = new std::thread(&CPU_RunLoop);
cpuThread->detach();
CPU_WaitStatus(cpuThreadReplyCond, &CPU_IsReady);
} else {
CPU_Init();