Refactor wait verification a bit in kernel waits.

This commit is contained in:
Unknown W. Brackets committed 2013-09-07 10:54:00 -07:00
1 parent 46b52ca552
commit f35b164d11
8 files changed
+30 -88

No files matched your search

+2 -2
View File
@@ -45,6 +45,7 @@
#include "Core/HLE/sceKernelThread.h"
#include "Core/HLE/sceKernelMemory.h"
#include "Core/HLE/sceIo.h"
#include "Core/HLE/KernelWaitHelpers.h"
enum {
PSP_THREAD_ATTR_USER = 0x80000000
@@ -1611,8 +1612,7 @@ void __KernelReturnFromModuleFunc()
for (auto it = module->waitingThreads.begin(), end = module->waitingThreads.end(); it < end; ++it)
{
// Still waiting?
SceUID waitingModuleID = __KernelGetWaitID(it->threadID, WAITTYPE_MODULE, error);
if (waitingModuleID == leftModuleID)
if (HLEKernel::VerifyWait(it->threadID, WAITTYPE_MODULE, leftModuleID))
{
if (it->statusPtr != 0)
Memory::Write_U32(exitStatus, it->statusPtr);