Files
ss/include/lib/rvl/OS/OSMutex.h
T
lepelog 42880ec9ae init
2023-08-09 16:59:04 +02:00

27 lines
593 B
C

#ifndef RVL_SDK_OS_MUTEX_H
#define RVL_SDK_OS_MUTEX_H
#include <lib/rvl/OS/OSThread.h>
#include <lib/rvl/types.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSMutex {
OSThreadQueue queue; // at 0x0
OSThread* thread; // at 0x8
s32 lock; // at 0xC
struct OSMutex* next; // at 0x10
struct OSMutex* prev; // at 0x14
} OSMutex;
void OSInitMutex(OSMutex* mutex);
void OSLockMutex(OSMutex* mutex);
void OSUnlockMutex(OSMutex* mutex);
void __OSUnlockAllMutex(OSThread* thread);
BOOL OSTryLockMutex(OSMutex* mutex);
#ifdef __cplusplus
}
#endif
#endif