diff options
Diffstat (limited to 'include/user/kernel/processmgr.h')
-rw-r--r-- | include/user/kernel/processmgr.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/include/user/kernel/processmgr.h b/include/user/kernel/processmgr.h new file mode 100644 index 0000000..e5e2a12 --- /dev/null +++ b/include/user/kernel/processmgr.h @@ -0,0 +1,80 @@ +#ifndef _PSP2_KERNEL_PROCESSMGR_H_ +#define _PSP2_KERNEL_PROCESSMGR_H_ + +#include <psp2/kernel/threadmgr.h> +#include <psp2/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + PSP2_KERNEL_PROCESS_PRIORITY_SYSTEM_HIGH = 32, + PSP2_KERNEL_PROCESS_PRIORITY_SYSTEM_DEFAULT = 96, + PSP2_KERNEL_PROCESS_PRIORITY_SYSTEM_LOW = 159 +}; + +enum { + PSP2_KERNEL_PROCESS_PRIORITY_USER_HIGH = 64, + PSP2_KERNEL_PROCESS_PRIORITY_USER_DEFAULT = 96, + PSP2_KERNEL_PROCESS_PRIORITY_USER_LOW = 127 +}; + +enum { + /** Cancel all timers */ + PSP2_KERNEL_POWER_TICK_DEFAULT = 0, + /** Cancel automatic suspension timer */ + PSP2_KERNEL_POWER_TICK_DISABLE_AUTO_SUSPEND = 1, + /** Cancel OLED-off timer */ + PSP2_KERNEL_POWER_TICK_DISABLE_OLED_OFF = 4, + /** Cancel OLED dimming timer */ + PSP2_KERNEL_POWER_TICK_DISABLE_OLED_DIMMING = 6 +}; + +/*** + * Exit current Process with specified return code + * + * @param[in] res - Exit code to return + * + * @return 0 on success, < 0 on error. + * @note - If NULL is provided as FrameBuf pointer, output is blacked out. +*/ +int sceKernelExitProcess(int res); + +/*** + * Cancel specified idle timers to prevent entering in power save processing. + * + * @param[in] type - One of ::KernelPowerTickType + * + * @return 0 +*/ +int sceKernelPowerTick(int type); + +/*** + * Get the process time of the current process. + * + * @param[out] type - Pointer to a ::SceKernelSysClock structure which will receive the process time. + * + * @return 0 on success, < 0 on error. +*/ +int sceKernelGetProcessTime(SceKernelSysClock *pSysClock); + +/*** + * Get the lower 32 bits part of process time of the current process. + * + * @return process time of the current process +*/ +SceUInt32 sceKernelGetProcessTimeLow(void); + +/*** + * Get the process time of the current process. + * + * @return process time of the current process +*/ +SceUInt64 sceKernelGetProcessTimeWide(void); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_KERNEL_PROCESSMGR_H_ */ |