Files
tp/include/dolphin/os/OSSemaphore.h
T
TakaRikka 2453c0e333 copy dolsdk2004 to tp / b_bh + e_mb done (#2299)
* move dolsdk2004 over

* cleanup some temp work

* finish and cleanup gf

* b_bh done

* d_a_e_mb done
2025-02-10 21:20:42 +02:00

26 lines
504 B
C

#ifndef _DOLPHIN_OSSEMAPHORE_H_
#define _DOLPHIN_OSSEMAPHORE_H_
#include <dolphin/os/OSThread.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct OSSemaphore {
s32 count;
OSThreadQueue queue;
} OSSemaphore;
void OSInitSemaphore(OSSemaphore* sem, s32 count);
s32 OSWaitSemaphore(OSSemaphore* sem);
s32 OSTryWaitSemaphore(OSSemaphore* sem);
s32 OSSignalSemaphore(OSSemaphore* sem);
s32 OSGetSemaphoreCount(OSSemaphore* sem);
#ifdef __cplusplus
}
#endif
#endif // _DOLPHIN_OSSEMAPHORE_H_