Simplify adding report messages, add a bunch more.
This commit is contained in:
parent
f89358d6ff
commit
e4223dbcb0
18 changed files with 79 additions and 103 deletions
|
@ -818,8 +818,7 @@ void __KernelIdle()
|
|||
}
|
||||
else
|
||||
{
|
||||
WARN_LOG(HLE, "UNTESTED - Callback thread deleted during interrupt?");
|
||||
Reporting::ReportMessage("Callback thread deleted during interrupt?");
|
||||
WARN_LOG_REPORT(HLE, "UNTESTED - Callback thread deleted during interrupt?");
|
||||
g_inCbCount = 0;
|
||||
currentCallbackThreadID = 0;
|
||||
}
|
||||
|
@ -1146,17 +1145,13 @@ void __KernelWaitCurThread(WaitType type, SceUID waitID, u32 waitValue, u32 time
|
|||
{
|
||||
if (!dispatchEnabled)
|
||||
{
|
||||
WARN_LOG(HLE, "Ignoring wait, dispatching disabled... right thing to do?");
|
||||
Reporting::ReportMessage("Ignoring wait, dispatching disabled");
|
||||
WARN_LOG_REPORT(HLE, "Ignoring wait, dispatching disabled... right thing to do?");
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Need to defer if in callback?
|
||||
if (g_inCbCount > 0)
|
||||
{
|
||||
WARN_LOG(HLE, "UNTESTED - waiting within a callback, probably bad mojo.");
|
||||
Reporting::ReportMessage("Waiting within callback");
|
||||
}
|
||||
WARN_LOG_REPORT(HLE, "UNTESTED - waiting within a callback, probably bad mojo.");
|
||||
|
||||
Thread *thread = __GetCurrentThread();
|
||||
thread->nt.waitID = waitID;
|
||||
|
@ -1492,20 +1487,13 @@ int __KernelCreateThread(const char *threadName, SceUID moduleID, u32 entry, u32
|
|||
// TODO: PSP actually fails for many of these cases, but trying for compat.
|
||||
if (stacksize < 0x200 || stacksize >= 0x20000000)
|
||||
{
|
||||
WARN_LOG(HLE, "sceKernelCreateThread(name=\"%s\"): bogus stack size %08x, using 0x4000", threadName, stacksize);
|
||||
Reporting::ReportMessage("sceKernelCreateThread(name=\"%s\"): bogus stack size %08x, using 0x4000", threadName, stacksize);
|
||||
WARN_LOG_REPORT(HLE, "sceKernelCreateThread(name=\"%s\"): bogus stack size %08x, using 0x4000", threadName, stacksize);
|
||||
stacksize = 0x4000;
|
||||
}
|
||||
if (prio < 0x08 || prio > 0x77)
|
||||
{
|
||||
WARN_LOG(HLE, "sceKernelCreateThread(name=\"%s\"): bogus priority %08x", threadName, prio);
|
||||
Reporting::ReportMessage("sceKernelCreateThread(name=\"%s\"): bogus priority %08x", threadName, prio);
|
||||
}
|
||||
WARN_LOG_REPORT(HLE, "sceKernelCreateThread(name=\"%s\"): bogus priority %08x", threadName, prio);
|
||||
if (!Memory::IsValidAddress(entry))
|
||||
{
|
||||
WARN_LOG(HLE, "sceKernelCreateThread(name=\"%s\"): invalid entry %08x", threadName, entry);
|
||||
Reporting::ReportMessage("sceKernelCreateThread(name=\"%s\"): invalid entry %08x", threadName, entry);
|
||||
}
|
||||
WARN_LOG_REPORT(HLE, "sceKernelCreateThread(name=\"%s\"): invalid entry %08x", threadName, entry);
|
||||
|
||||
// We're assuming all threads created are user threads.
|
||||
if ((attr & PSP_THREAD_ATTR_KERNEL) == 0)
|
||||
|
@ -1515,10 +1503,7 @@ int __KernelCreateThread(const char *threadName, SceUID moduleID, u32 entry, u32
|
|||
__KernelCreateThread(id, moduleID, threadName, entry, prio, stacksize, attr);
|
||||
INFO_LOG(HLE, "%i = sceKernelCreateThread(name=\"%s\", entry=%08x, prio=%x, stacksize=%i)", id, threadName, entry, prio, stacksize);
|
||||
if (optionAddr != 0)
|
||||
{
|
||||
WARN_LOG(HLE, "sceKernelCreateThread(name=\"%s\"): unsupported options parameter %08x", threadName, optionAddr);
|
||||
Reporting::ReportMessage("sceKernelCreateThread(name=\"%s\"): unsupported options parameter %08x", threadName, optionAddr);
|
||||
}
|
||||
WARN_LOG_REPORT(HLE, "sceKernelCreateThread(name=\"%s\"): unsupported options parameter %08x", threadName, optionAddr);
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -1589,10 +1574,8 @@ int sceKernelStartThread(SceUID threadToStartID, u32 argSize, u32 argBlockPtr)
|
|||
hleReSchedule("thread started");
|
||||
}
|
||||
else if (!dispatchEnabled)
|
||||
{
|
||||
WARN_LOG(HLE, "UNTESTED Dispatch disabled while starting worse-priority thread");
|
||||
Reporting::ReportMessage("UNTESTED Dispatch disabled while starting worse-priority thread");
|
||||
}
|
||||
WARN_LOG_REPORT(HLE, "UNTESTED Dispatch disabled while starting worse-priority thread");
|
||||
|
||||
__KernelChangeReadyState(startThread, threadToStartID, true);
|
||||
return 0;
|
||||
}
|
||||
|
@ -2139,10 +2122,7 @@ int sceKernelReleaseWaitThread(SceUID threadID)
|
|||
{
|
||||
DEBUG_LOG(HLE, "sceKernelReleaseWaitThread(%i)", threadID);
|
||||
if (__KernelInCallback())
|
||||
{
|
||||
WARN_LOG(HLE, "UNTESTED sceKernelReleaseWaitThread() might not do the right thing in a callback");
|
||||
Reporting::ReportMessage("sceKernelReleaseWaitThread() might not do the right thing in a callback");
|
||||
}
|
||||
WARN_LOG_REPORT(HLE, "UNTESTED sceKernelReleaseWaitThread() might not do the right thing in a callback");
|
||||
|
||||
if (threadID == 0 || threadID == currentThread)
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_THID;
|
||||
|
@ -2592,7 +2572,7 @@ void __KernelExecuteMipsCallOnCurrentThread(u32 callId, bool reschedAfter)
|
|||
}
|
||||
|
||||
if (g_inCbCount > 0) {
|
||||
WARN_LOG(HLE, "__KernelExecuteMipsCallOnCurrentThread(): Already in a callback!");
|
||||
WARN_LOG_REPORT(HLE, "__KernelExecuteMipsCallOnCurrentThread(): Already in a callback!");
|
||||
}
|
||||
DEBUG_LOG(HLE, "Executing mipscall %i", callId);
|
||||
MipsCall *call = mipsCalls.get(callId);
|
||||
|
@ -2633,7 +2613,7 @@ void __KernelReturnFromMipsCall()
|
|||
|
||||
u32 callId = cur->currentCallbackId;
|
||||
if (currentMIPS->r[MIPS_REG_CALL_ID] != callId)
|
||||
WARN_LOG(HLE, "__KernelReturnFromMipsCall(): s0 is %08x != %08x", currentMIPS->r[MIPS_REG_CALL_ID], callId);
|
||||
WARN_LOG_REPORT(HLE, "__KernelReturnFromMipsCall(): s0 is %08x != %08x", currentMIPS->r[MIPS_REG_CALL_ID], callId);
|
||||
|
||||
MipsCall *call = mipsCalls.pop(callId);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue