Implement sceUmdCancelWaitDriveStat().

This commit is contained in:
Unknown W. Brackets committed 2012-12-01 23:29:22 -08:00
1 parent f3e23f2672
commit c00f3dcdd8
3 files changed
+17 -3

No files matched your search

+13 -1
View File
@@ -608,7 +608,7 @@ u32 __KernelResumeThreadFromWait(SceUID threadID, int retval)
// Only run when you can safely accept a context switch
// Triggers a waitable event, that is, it wakes up all threads that waits for it
// If any changes were made, it will context switch
bool __KernelTriggerWait(WaitType type, int id, bool dontSwitch)
bool __KernelTriggerWait(WaitType type, int id, bool useRetVal, int retVal, bool dontSwitch)
{
bool doneAnything = false;
@@ -621,6 +621,8 @@ bool __KernelTriggerWait(WaitType type, int id, bool dontSwitch)
{
// This thread was waiting for the triggered object.
__KernelResumeThreadFromWait(t);
if (useRetVal)
t->setReturnValue(retVal);
doneAnything = true;
}
}
@@ -639,6 +641,16 @@ bool __KernelTriggerWait(WaitType type, int id, bool dontSwitch)
return true;
}
bool __KernelTriggerWait(WaitType type, int id, bool dontSwitch)
{
return __KernelTriggerWait(type, id, false, 0, dontSwitch);
}
bool __KernelTriggerWait(WaitType type, int id, int retVal, bool dontSwitch)
{
return __KernelTriggerWait(type, id, true, retVal, dontSwitch);
}
// makes the current thread wait for an event
void __KernelWaitCurThread(WaitType type, SceUID waitID, u32 waitValue, u32 timeoutPtr, bool processCallbacks)
{