mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-12 14:00:27 +02:00
Disallow suspend/resume on current thread.
Might be some extra subtle things with callbacks/interrupts here...
This commit is contained in:
1 parent
e6795b1a41
commit
2c4254d0c8
1 file changed
+14
@@ -2486,6 +2486,13 @@ int sceKernelReleaseWaitThread(SceUID threadID)
|
||||
|
||||
int sceKernelSuspendThread(SceUID threadID)
|
||||
{
|
||||
// TODO: What about interrupts/callbacks?
|
||||
if (threadID == 0 || threadID == currentThread)
|
||||
{
|
||||
ERROR_LOG(HLE, "sceKernelSuspendThread(%d): cannot suspend current thread", threadID);
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_THID;
|
||||
}
|
||||
|
||||
u32 error;
|
||||
Thread *t = kernelObjects.Get<Thread>(threadID, error);
|
||||
if (t)
|
||||
@@ -2516,6 +2523,13 @@ int sceKernelSuspendThread(SceUID threadID)
|
||||
|
||||
int sceKernelResumeThread(SceUID threadID)
|
||||
{
|
||||
// TODO: What about interrupts/callbacks?
|
||||
if (threadID == 0 || threadID == currentThread)
|
||||
{
|
||||
ERROR_LOG(HLE, "sceKernelSuspendThread(%d): cannot suspend current thread", threadID);
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_THID;
|
||||
}
|
||||
|
||||
u32 error;
|
||||
Thread *t = kernelObjects.Get<Thread>(threadID, error);
|
||||
if (t)
|
||||
|
||||
Reference in new issue
Block a user