diff options
author | Davee | 2018-10-31 07:28:57 +0000 |
---|---|---|
committer | devnoname120 | 2018-11-03 11:59:52 +0100 |
commit | 8cf5898db90a89f552a5dae19146faff31627b87 (patch) | |
tree | 1a0c0440c4129c2a6a6df3eb4c9d8b103551c388 | |
parent | switch naming ksceKernelProcessResume to ksceKernelResumeProcess (diff) | |
download | vds-libraries-8cf5898db90a89f552a5dae19146faff31627b87.tar.gz |
add ksceKernelChangeThreadSuspendStatus
This service allows you to change the status of a suspended thread. Most of the valid suspend bits are unknown, but some can be used to prevent the kernel rethrowing exceptions or pull threads into the running/ready state.
-rw-r--r-- | include/kernel/kernel/threadmgr.h | 14 | ||||
-rw-r--r-- | nids/360/SceKernelThreadMgr.yml | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/kernel/kernel/threadmgr.h b/include/kernel/kernel/threadmgr.h index 9f36da0..779da1e 100644 --- a/include/kernel/kernel/threadmgr.h +++ b/include/kernel/kernel/threadmgr.h @@ -908,6 +908,20 @@ typedef struct ThreadCpuRegisters */ int sceKernelGetThreadCpuRegisters(SceUID thid, ThreadCpuRegisters *registers); + +/** + * @brief Change the thread suspension status to another value. + * + * More research needs to be done to find out exactly what each status actually means. Some examples of useful scenarios: + * When handling an exception changing the status to 0x1002 (on a newly suspended thread) will stop the kernel rethrowing the same exception. + * When resuming a suspended thread changing the status to 2 will allow it to resume. + * + * @param[in] thid The thread to change. + * @param[in] status The new status for suspension. + * @return Zero on success, else < 0 on error. + */ +int sceKernelChangeThreadSuspendStatus(SceUID thid, int status); + #ifdef __cplusplus } #endif diff --git a/nids/360/SceKernelThreadMgr.yml b/nids/360/SceKernelThreadMgr.yml index fb25df9..1a34700 100644 --- a/nids/360/SceKernelThreadMgr.yml +++ b/nids/360/SceKernelThreadMgr.yml @@ -109,6 +109,7 @@ modules: sceKernelCancelCallback: 0xC040EC1C sceKernelCancelMutex: 0x7204B846 sceKernelChangeThreadPriority: 0x63DAB420 + sceKernelChangeThreadSuspendStatus: 0x04C6764B sceKernelCheckCallback: 0xE53E41F6 sceKernelCheckWaitableStatus: 0xD9BD74EB sceKernelClearEvent: 0x9C335818 |