summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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)