summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunho Kim2020-08-03 14:20:28 +0900
committerGitHub2020-08-03 14:20:28 +0900
commitfde83b60c12d5900a5247cfb2bcc23fa5caa486f (patch)
treeef4cc7c545a17ea6f45b8a89d626647e615e08c6
parentUpdate vshbridge and modulemgr (#457) (diff)
downloadvds-libraries-fde83b60c12d5900a5247cfb2bcc23fa5caa486f.tar.gz
Add sceKernelWaitSignal and sceKernelSendSignal (#462)
* Add sceKernelWaitSignal and sceKernelSendSignal * Update threadmgr.h * Update threadmgr.h
-rw-r--r--include/user/kernel/threadmgr.h23
1 files changed, 23 insertions, 0 deletions
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)