libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
Cond.h
1/****************************************************************************
2 * Platform Abstraction Layer
3 * Daryl Borth 2026
4 * Cond.h
5 *
6 * Generic - Everything platform-specific lives behind platform->getThread().
7 ***************************************************************************/
8#pragma once
9#include "Mutex.h"
10
16class Cond
17{
18 public:
19 Cond();
20 ~Cond();
21
22 Cond(const Cond &) = delete;
23 Cond & operator=(const Cond &) = delete;
24
29 void wait(Mutex & lock);
32 void signal();
33
34 protected:
35 void * handle = nullptr;
36};
void signal()
Wakes every thread currently blocked in wait() on this condition variable.
Definition Cond.cpp:29
void * handle
Backend-assigned condition variable handle.
Definition Cond.h:35
void wait(Mutex &lock)
Unlocks lock and blocks until signal() is called, then reacquires lock before returning.
Definition Cond.cpp:23
A simple mutual-exclusion lock.
Definition Mutex.h:14