Wrap sceKernelGetThreadExitStatus().

So it's usable internally too.
This commit is contained in:
Unknown W. Brackets committed 2013-05-26 10:17:59 -07:00
1 parent 2624423cde
commit a779645152
3 files changed
+6 -7

No files matched your search

+4 -5
View File
@@ -1256,9 +1256,8 @@ u32 sceKernelReferThreadRunStatus(u32 threadID, u32 statusPtr)
return 0;
}
void sceKernelGetThreadExitStatus()
int sceKernelGetThreadExitStatus(SceUID threadID)
{
SceUID threadID = PARAM(0);
if (threadID == 0)
threadID = __KernelGetCurThread();
@@ -1269,17 +1268,17 @@ void sceKernelGetThreadExitStatus()
if (t->nt.status == THREADSTATUS_DORMANT) // TODO: can be dormant before starting, too, need to avoid that
{
DEBUG_LOG(HLE,"sceKernelGetThreadExitStatus(%i)", threadID);
RETURN(t->nt.exitStatus);
return t->nt.exitStatus;
}
else
{
RETURN(SCE_KERNEL_ERROR_NOT_DORMANT);
return SCE_KERNEL_ERROR_NOT_DORMANT;
}
}
else
{
ERROR_LOG(HLE,"sceKernelGetThreadExitStatus Error %08x", error);
RETURN(SCE_KERNEL_ERROR_UNKNOWN_THID);
return SCE_KERNEL_ERROR_UNKNOWN_THID;
}
}