From fde83b60c12d5900a5247cfb2bcc23fa5caa486f Mon Sep 17 00:00:00 2001 From: Sunho Kim Date: Mon, 3 Aug 2020 14:20:28 +0900 Subject: Add sceKernelWaitSignal and sceKernelSendSignal (#462) * Add sceKernelWaitSignal and sceKernelSendSignal * Update threadmgr.h * Update threadmgr.h--- include/user/kernel/threadmgr.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include/user') diff --git a/include/user/kernel/threadmgr.h b/include/user/kernel/threadmgr.h index 4bc8ac3..3ece29e 100644 --- a/include/user/kernel/threadmgr.h +++ b/include/user/kernel/threadmgr.h @@ -1129,6 +1129,29 @@ int sceKernelDeleteLwCond(SceKernelLwCondWork *pWork); int sceKernelSignalLwCond(SceKernelLwCondWork *pWork); int sceKernelWaitLwCond(SceKernelLwCondWork *pWork, unsigned int *pTimeout); +typedef struct SceKernelWaitSignalOptParam { + SceUInt32 unk; +} SceKernelWaitSignalOptParam; + +/** + * @brief Sleep current thread and wait for a signal. After it receives a signal, the thread wakes up. + * + * This is like a semphore with limit 1. + * If signal was sent before and not consumed before, the function will immediately return. + * + * @param params - extra parameters + * @return 0 on success + */ +int sceKernelWaitSignal(SceUInt32 unk0, SceUInt32 unk1, SceKernelWaitSignalOptParam *params); + +/** + * @brief Send a signal to another thread specified by thid. + * + * @param thid - the id of the thread to send a signal to + * @return 0 on success + * @return SCE_KERNEL_ERROR_ALREADY_SENT if the last signal was not consumed by sceKernelWaitSignal + */ +int sceKernelSendSignal(SceUID thid); /** * Get the system time (wide version) -- cgit v1.2.3 From f8a04eb839122da2cf9e2f4b7b52eb9b95f45d4d Mon Sep 17 00:00:00 2001 From: Rinnegatamante Date: Fri, 7 Aug 2020 15:19:36 +0200 Subject: Properly populated ScePowerCallbackType enum. --- include/user/power.h | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'include/user') diff --git a/include/user/power.h b/include/user/power.h index 8148139..ed35bed 100644 --- a/include/user/power.h +++ b/include/user/power.h @@ -18,24 +18,30 @@ typedef enum ScePowerErrorCode { } ScePowerErrorCode; typedef enum ScePowerCallbackType { - /** indicates the power button was pushed, putting the unit into suspend mode */ - SCE_POWER_CB_POWER_SWITCH = 0x80000000, - /** ? screen on after off ? **/ - SCE_POWER_CB_UNK_1 = 0x00600000, - /** ? screen off ? **/ - SCE_POWER_CB_UNK_2 = 0x00400000, - /** indicates the unit has finish resuming from suspend mode */ - SCE_POWER_CB_RESUME_COMPLETE = 0x00040000, - /** indicates the unit is resuming from suspend mode */ - SCE_POWER_CB_RESUMING = 0x00020000, - /** indicates the unit is suspending, seems to occur due to inactivity */ - SCE_POWER_CB_SUSPENDING = 0x00010000, - /** indicates the unit is plugged into an AC outlet */ - SCE_POWER_CB_AC_POWER = 0x00001000, + /** indicates the unit is using battery as power source */ + SCE_POWER_CB_BATTERY_MODE = 0x00000000, /** indicates the battery is in low state */ - SCE_POWER_CB_LOWBATTERY = 0x00000100, - /** indicates there is a battery present in the unit */ - SCE_POWER_CB_BATTERY_EXIST = 0x00000080 + SCE_POWER_CB_LOW_BATTERY = 0x00000100, + /** indicates the unit is using an AC outlet as power source */ + SCE_POWER_CB_AC_POWER_MODE = 0x00001000, + /** indicates the unit has been shutdown **/ + SCE_POWER_CB_SHUTDOWN = 0x00010000, + /** indicates the application resumed after being put in suspend from a LiveArea event **/ + SCE_POWER_CB_RESUME_LIVEAREA = 0x00200000, + /** indicates the unit entered suspend mode **/ + SCE_POWER_CB_SUSPENDING = 0x00400000, + /** indicates the unit resumed from suspend mode **/ + SCE_POWER_CB_RESUMING = 0x00800000, + /** indicates the system is taking a screenshot **/ + SCE_POWER_CB_SCREENSHOT_TRIGGER = 0x04000000, + /** indicates the system shown the Quick Menu screen **/ + SCE_POWER_CB_QUICK_MENU_TRIGGER = 0x10000000, + /** indicates the PS button was pushed **/ + SCE_POWER_CB_PS_BUTTON_PRESS = 0x20000000, + /** indicates the system shown the shutdown screen **/ + SCE_POWER_CB_SHUTDOWN_MENU_TRIGGER = 0x40000000, + /** indicates the system shown the unlock screen **/ + SCE_POWER_CB_UNLOCK_MENU_TRIGGER = 0x80000000, } ScePowerCallbackType; /* GPU, WLAN/COM configuration setting */ -- cgit v1.2.3 From b4fbb87694c8b0a9c04d4ca527488cdf90b1c8c3 Mon Sep 17 00:00:00 2001 From: Reiko Asakura Date: Mon, 14 Sep 2020 20:49:31 -0400 Subject: Revert vitasdk commits Revert "travis: Install libclang1-9 and libclang-cpp9 for doxygen" This reverts commit 18133956d69a0f02feb42cc441c013bfd84b6388. Revert "travis: Bump ubuntu version to 20.04" This reverts commit 5dee9e2f731747cbeff8003c05373dcd51557bee. Revert "travis: Bump up doxygen version to 1.8.20" This reverts commit 29b1e2243f12ea7f1dccfa1d182d858fb27ea949. Revert "Properly populated ScePowerCallbackType enum." This reverts commit faf03c48bdd0c698f8c5cd14947821de8ea71f6b. Revert "Added some prototypes for command lists and deferred contexts." This reverts commit 77791c80439a341e0ac05a2eb8f52f483f304428. --- include/user/power.h | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) (limited to 'include/user') diff --git a/include/user/power.h b/include/user/power.h index ed35bed..8148139 100644 --- a/include/user/power.h +++ b/include/user/power.h @@ -18,30 +18,24 @@ typedef enum ScePowerErrorCode { } ScePowerErrorCode; typedef enum ScePowerCallbackType { - /** indicates the unit is using battery as power source */ - SCE_POWER_CB_BATTERY_MODE = 0x00000000, + /** indicates the power button was pushed, putting the unit into suspend mode */ + SCE_POWER_CB_POWER_SWITCH = 0x80000000, + /** ? screen on after off ? **/ + SCE_POWER_CB_UNK_1 = 0x00600000, + /** ? screen off ? **/ + SCE_POWER_CB_UNK_2 = 0x00400000, + /** indicates the unit has finish resuming from suspend mode */ + SCE_POWER_CB_RESUME_COMPLETE = 0x00040000, + /** indicates the unit is resuming from suspend mode */ + SCE_POWER_CB_RESUMING = 0x00020000, + /** indicates the unit is suspending, seems to occur due to inactivity */ + SCE_POWER_CB_SUSPENDING = 0x00010000, + /** indicates the unit is plugged into an AC outlet */ + SCE_POWER_CB_AC_POWER = 0x00001000, /** indicates the battery is in low state */ - SCE_POWER_CB_LOW_BATTERY = 0x00000100, - /** indicates the unit is using an AC outlet as power source */ - SCE_POWER_CB_AC_POWER_MODE = 0x00001000, - /** indicates the unit has been shutdown **/ - SCE_POWER_CB_SHUTDOWN = 0x00010000, - /** indicates the application resumed after being put in suspend from a LiveArea event **/ - SCE_POWER_CB_RESUME_LIVEAREA = 0x00200000, - /** indicates the unit entered suspend mode **/ - SCE_POWER_CB_SUSPENDING = 0x00400000, - /** indicates the unit resumed from suspend mode **/ - SCE_POWER_CB_RESUMING = 0x00800000, - /** indicates the system is taking a screenshot **/ - SCE_POWER_CB_SCREENSHOT_TRIGGER = 0x04000000, - /** indicates the system shown the Quick Menu screen **/ - SCE_POWER_CB_QUICK_MENU_TRIGGER = 0x10000000, - /** indicates the PS button was pushed **/ - SCE_POWER_CB_PS_BUTTON_PRESS = 0x20000000, - /** indicates the system shown the shutdown screen **/ - SCE_POWER_CB_SHUTDOWN_MENU_TRIGGER = 0x40000000, - /** indicates the system shown the unlock screen **/ - SCE_POWER_CB_UNLOCK_MENU_TRIGGER = 0x80000000, + SCE_POWER_CB_LOWBATTERY = 0x00000100, + /** indicates there is a battery present in the unit */ + SCE_POWER_CB_BATTERY_EXIST = 0x00000080 } ScePowerCallbackType; /* GPU, WLAN/COM configuration setting */ -- cgit v1.2.3