mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Remove __KernelTriggerWait(), no longer used.
This commit is contained in:
parent
8ae6694e1d
commit
4c828cd9a0
2 changed files with 0 additions and 50 deletions
|
@ -1598,51 +1598,6 @@ u32 __KernelResumeThreadFromWait(SceUID threadID, u64 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 after the syscall
|
||||
bool __KernelTriggerWait(WaitType type, int id, bool useRetVal, int retVal, const char *reason, bool dontSwitch)
|
||||
{
|
||||
bool doneAnything = false;
|
||||
|
||||
u32 error;
|
||||
for (std::vector<SceUID>::iterator iter = threadqueue.begin(); iter != threadqueue.end(); iter++)
|
||||
{
|
||||
Thread *t = kernelObjects.Get<Thread>(*iter, error);
|
||||
if (t && t->isWaitingFor(type, id))
|
||||
{
|
||||
// This thread was waiting for the triggered object.
|
||||
t->resumeFromWait();
|
||||
if (useRetVal)
|
||||
t->setReturnValue((u32)retVal);
|
||||
doneAnything = true;
|
||||
|
||||
if (type == WAITTYPE_THREADEND)
|
||||
__KernelCancelThreadEndTimeout(*iter);
|
||||
}
|
||||
}
|
||||
|
||||
// if (doneAnything) // lumines?
|
||||
{
|
||||
if (!dontSwitch)
|
||||
{
|
||||
// TODO: time waster
|
||||
hleReSchedule(reason);
|
||||
}
|
||||
}
|
||||
return doneAnything;
|
||||
}
|
||||
|
||||
bool __KernelTriggerWait(WaitType type, int id, const char *reason, bool dontSwitch)
|
||||
{
|
||||
return __KernelTriggerWait(type, id, false, 0, reason, dontSwitch);
|
||||
}
|
||||
|
||||
bool __KernelTriggerWait(WaitType type, int id, int retVal, const char *reason, bool dontSwitch)
|
||||
{
|
||||
return __KernelTriggerWait(type, id, true, retVal, reason, dontSwitch);
|
||||
}
|
||||
|
||||
// makes the current thread wait for an event
|
||||
void __KernelWaitCurThread(WaitType type, SceUID waitID, u32 waitValue, u32 timeoutPtr, bool processCallbacks, const char *reason)
|
||||
{
|
||||
|
|
|
@ -151,11 +151,6 @@ const char *__KernelGetThreadName(SceUID threadID);
|
|||
void __KernelSaveContext(ThreadContext *ctx, bool vfpuEnabled);
|
||||
void __KernelLoadContext(ThreadContext *ctx, bool vfpuEnabled);
|
||||
|
||||
// TODO: Replace this with __KernelResumeThreadFromWait over time as it's misguided.
|
||||
// It's better that each subsystem keeps track of the list of waiting threads
|
||||
// and resumes them manually one by one using __KernelResumeThreadFromWait.
|
||||
bool __KernelTriggerWait(WaitType type, int id, const char *reason, bool dontSwitch = false);
|
||||
bool __KernelTriggerWait(WaitType type, int id, int retVal, const char *reason, bool dontSwitch);
|
||||
u32 __KernelResumeThreadFromWait(SceUID threadID); // can return an error value
|
||||
u32 __KernelResumeThreadFromWait(SceUID threadID, u32 retval);
|
||||
u32 __KernelResumeThreadFromWait(SceUID threadID, u64 retval);
|
||||
|
|
Loading…
Add table
Reference in a new issue