libnx/nx/include/switch/kernel/condvar.h
2018-01-31 02:22:28 +01:00

19 lines
431 B
C

// Copyright 2018 plutoo
#include "../types.h"
#include "../kernel/mutex.h"
typedef struct {
u32 tag;
Mutex* mutex;
} CondVar;
void condvarInit(CondVar* c, Mutex* m);
// When the wait-functions return, the mutex is acquired.
void condvarWaitTimeout(CondVar* c, u64 timeout);
void condvarWait(CondVar* c);
Result condvarWake(CondVar* c, int num);
Result condvarWakeOne(CondVar* c);
Result condvarWakeAll(CondVar* c);