vitasdk
Documentation of the vitasdk
mutex.h
Go to the documentation of this file.
1 
6 #ifndef _PSP2_KERNEL_THREADMGR_MUTEX_H_
7 #define _PSP2_KERNEL_THREADMGR_MUTEX_H_
8 
9 #include <vitasdk/build_utils.h>
10 #include <psp2/types.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 
33 SceUID sceKernelCreateMutex(const char *name, SceUInt attr, int initCount, SceKernelMutexOptParam *option);
34 
42 
49 int sceKernelOpenMutex(const char *name);
50 
58 
67 int sceKernelLockMutex(SceUID mutexid, int lockCount, unsigned int *timeout);
68 
77 int sceKernelLockMutexCB(SceUID mutexid, int lockCount, unsigned int *timeout);
78 
86 int sceKernelTryLockMutex(SceUID mutexid, int lockCount);
87 
95 int sceKernelUnlockMutex(SceUID mutexid, int unlockCount);
96 
105 int sceKernelCancelMutex(SceUID mutexid, int newCount, int *numWaitThreads);
106 
116 
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif /* _PSP2_KERNEL_THREADMGR_MUTEX_H_ */
int sceKernelLockMutex(SceUID mutexid, int lockCount, unsigned int *timeout)
Lock a mutex.
int sceKernelDeleteMutex(SceUID mutexid)
Destroy a mutex.
int sceKernelUnlockMutex(SceUID mutexid, int unlockCount)
Try to unlock a mutex (non-blocking)
SceUID sceKernelCreateMutex(const char *name, SceUInt attr, int initCount, SceKernelMutexOptParam *option)
Creates a new mutex.
int sceKernelGetMutexInfo(SceUID mutexid, SceKernelMutexInfo *info)
Retrieve information about a mutex.
int sceKernelLockMutexCB(SceUID mutexid, int lockCount, unsigned int *timeout)
Lock a mutex and handle callbacks if necessary.
int sceKernelTryLockMutex(SceUID mutexid, int lockCount)
Try to lock a mutex (non-blocking)
int sceKernelCloseMutex(SceUID mutexid)
Close a mutex.
int sceKernelOpenMutex(const char *name)
Open a mutex.
int sceKernelCancelMutex(SceUID mutexid, int newCount, int *numWaitThreads)
Cancels a mutex.
Current state of a mutex.
Definition: threadmgr.h:284
Additional options used when creating mutexes.
Definition: threadmgr.h:274
uint32_t SceUInt
Definition: types.h:48
int SceUID
UIDs are used to describe many different kernel objects.
Definition: types.h:90