mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-02 22:26:25 +00:00
Get rid of the "root" return hack.
This commit is contained in:
parent
c34854ead3
commit
727b3b4127
@ -1170,7 +1170,14 @@ void __KernelReturnFromModuleFunc()
|
||||
{
|
||||
// Return from the thread as normal.
|
||||
__KernelReturnFromThread();
|
||||
// TODO: sceKernelGetThreadExitStatus, __KernelGetCurThreadModuleId()
|
||||
|
||||
SceUID leftModuleID = __KernelGetCurThreadModuleId();
|
||||
SceUID leftThreadID = __KernelGetCurThread();
|
||||
int exitStatus = sceKernelGetThreadExitStatus(leftThreadID);
|
||||
|
||||
// Reschedule immediately (to leave the thread) and delete it and its stack.
|
||||
__KernelReSchedule("returned from module");
|
||||
sceKernelDeleteThread(leftThreadID);
|
||||
}
|
||||
|
||||
struct GetModuleIdByAddressArg
|
||||
|
@ -2010,10 +2010,6 @@ void __KernelReturnFromThread()
|
||||
_dbg_assert_msg_(HLE, thread != NULL, "Returned from a NULL thread.");
|
||||
|
||||
INFO_LOG(HLE,"__KernelReturnFromThread: %d", exitStatus);
|
||||
// TEMPORARY HACK: kill the stack of the root thread early:
|
||||
if (!strcmp(thread->GetName(), "root")) {
|
||||
thread->FreeStack();
|
||||
}
|
||||
|
||||
thread->nt.exitStatus = exitStatus;
|
||||
__KernelChangeReadyState(thread, currentThread, false);
|
||||
|
Loading…
Reference in New Issue
Block a user