From 8cf5898db90a89f552a5dae19146faff31627b87 Mon Sep 17 00:00:00 2001 From: Davee Date: Wed, 31 Oct 2018 07:28:57 +0000 Subject: 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. --- include/kernel/kernel/threadmgr.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/kernel') 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 -- cgit v1.2.3