From 3a3c439e6af6a60008b8c955c3126b3f0a870ca4 Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Sat, 20 Apr 2024 23:40:10 +0200 Subject: [PATCH] Add extra information for attr in sceKernelCreateLwMutex --- src/user/pspthreadman.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/user/pspthreadman.h b/src/user/pspthreadman.h index f35c9a20..a9b99bca 100644 --- a/src/user/pspthreadman.h +++ b/src/user/pspthreadman.h @@ -589,6 +589,17 @@ int sceKernelPollSema(SceUID semaid, int signal); */ int sceKernelReferSemaStatus(SceUID semaid, SceKernelSemaInfo *info); +/** Attribute for lightweight mutex. */ +enum PspLwMutexAttributes +{ + /** The wait thread is queued using FIFO. */ + PSP_LW_MUTEX_ATTR_THFIFO = 0x0000U, + /** The wait thread is queued by thread priority . */ + PSP_LW_MUTEX_ATTR_THPRI = 0x0100U, + /** A recursive lock is allowed by the thread that acquired the lightweight mutex */ + PSP_LW_MUTEX_ATTR_RECURSIVE = 0x0200U +}; + /** Struct as workarea for lightweight mutex */ typedef struct { /** Count */ @@ -610,13 +621,13 @@ typedef struct { * * @param workarea - The pointer to the workarea * @param name - The name of the lightweight mutex - * @param attr - + * @param attr - The LwMutex attributes, zero or more of ::PspLwMutexAttributes. * @param initialCount - THe inital value of the mutex * @param optionsPTr - Other optioons for mutex * * @return 0 on success, otherwise one of ::PspKernelErrorCodes */ -int sceKernelCreateLwMutex(SceLwMutexWorkarea *workarea, const char *name, u32 attr, int initialCount, u32 *optionsPtr); +int sceKernelCreateLwMutex(SceLwMutexWorkarea *workarea, const char *name, SceUInt32 attr, int initialCount, u32 *optionsPtr); /** * Delete a lightweight mutex