mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 04:22:50 +02:00
19 lines
431 B
C
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);
|