mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-27 00:03:37 +01:00
Thread: Log error waiting already waiting thread.
This commit is contained in:
1 parent
b9ae574679
commit
f75cb9fbae
1 file changed
+8
-9
@@ -1528,16 +1528,16 @@ u32 __KernelResumeThreadFromWait(SceUID threadID, u64 retval)
|
||||
}
|
||||
|
||||
// makes the current thread wait for an event
|
||||
void __KernelWaitCurThread(WaitType type, SceUID waitID, u32 waitValue, u32 timeoutPtr, bool processCallbacks, const char *reason)
|
||||
{
|
||||
if (!dispatchEnabled)
|
||||
{
|
||||
void __KernelWaitCurThread(WaitType type, SceUID waitID, u32 waitValue, u32 timeoutPtr, bool processCallbacks, const char *reason) {
|
||||
if (!dispatchEnabled) {
|
||||
WARN_LOG_REPORT(SCEKERNEL, "Ignoring wait, dispatching disabled... right thing to do?");
|
||||
return;
|
||||
}
|
||||
|
||||
PSPThread *thread = __GetCurrentThread();
|
||||
_assert_(thread != nullptr);
|
||||
if ((thread->nt.status & THREADSTATUS_WAIT) != 0)
|
||||
WARN_LOG_REPORT(SCEKERNEL, "Waiting thread for %d that was already waiting for %d", type, thread->nt.waitType);
|
||||
thread->nt.waitID = waitID;
|
||||
thread->nt.waitType = type;
|
||||
__KernelChangeThreadState(thread, ThreadStatus(THREADSTATUS_WAIT | (thread->nt.status & THREADSTATUS_SUSPEND)));
|
||||
@@ -1545,22 +1545,21 @@ void __KernelWaitCurThread(WaitType type, SceUID waitID, u32 waitValue, u32 time
|
||||
thread->waitInfo.waitValue = waitValue;
|
||||
thread->waitInfo.timeoutPtr = timeoutPtr;
|
||||
|
||||
// TODO: time waster
|
||||
if (!reason)
|
||||
reason = "started wait";
|
||||
|
||||
hleReSchedule(processCallbacks, reason);
|
||||
}
|
||||
|
||||
void __KernelWaitCallbacksCurThread(WaitType type, SceUID waitID, u32 waitValue, u32 timeoutPtr)
|
||||
{
|
||||
if (!dispatchEnabled)
|
||||
{
|
||||
void __KernelWaitCallbacksCurThread(WaitType type, SceUID waitID, u32 waitValue, u32 timeoutPtr) {
|
||||
if (!dispatchEnabled) {
|
||||
WARN_LOG_REPORT(SCEKERNEL, "Ignoring wait, dispatching disabled... right thing to do?");
|
||||
return;
|
||||
}
|
||||
|
||||
PSPThread *thread = __GetCurrentThread();
|
||||
if ((thread->nt.status & THREADSTATUS_WAIT) != 0)
|
||||
WARN_LOG_REPORT(SCEKERNEL, "Waiting thread for %d that was already waiting for %d", type, thread->nt.waitType);
|
||||
thread->nt.waitID = waitID;
|
||||
thread->nt.waitType = type;
|
||||
__KernelChangeThreadState(thread, ThreadStatus(THREADSTATUS_WAIT | (thread->nt.status & THREADSTATUS_SUSPEND)));
|
||||
|
||||
Reference in new issue
Block a user