7#include "../ThreadDriver.h"
31 void waitCond(
void * cond,
void * mutex)
override;
Raw platform threading primitives.
Wii U ThreadDriver, built on coreinit's OSThread/OSMutex/OSCondition.
void waitCond(void *cond, void *mutex) override
Atomically unlocks mutex and blocks the calling thread until signalCond() is called,...
void sleepMilliseconds(uint32_t ms) override
Sleeps the calling thread for at least the given duration.
void shutdown() override
Shuts the threading backend down. Every thread must already have been joined.
void lockMutex(void *mutex) override
Blocks until the mutex is acquired.
void joinThread(void *thread) override
Blocks until the thread exits, then releases the handle.
void resumeThread(void *thread) override
Resumes a thread suspended with suspendThread().
void * createCond() override
Creates a condition variable.
void suspendThread(void *thread) override
Suspends a running thread until resumeThread() is called.
void * createMutex() override
Creates an unlocked mutex.
void destroyMutex(void *mutex) override
Destroys a mutex created by createMutex(). It must not be locked.
void signalCond(void *cond) override
Wakes every thread currently blocked in waitCond() on this condition variable.
void destroyCond(void *cond) override
Destroys a condition variable created by createCond(). No thread may be waiting on it.
void cancelThread(void *thread) override
Requests the thread stop running and releases the handle without blocking on it.
uintptr_t getCurrentThreadId() override
Returns an opaque, comparable identifier for the calling thread.
bool isThreadSuspended(void *thread) override
void unlockMutex(void *mutex) override
Releases a mutex held by the calling thread.
bool createThread(ThreadEntry entry, void *arg, uint32_t stackSize, ThreadPriority priority, void **outHandle) override
Creates and starts a thread running entry(arg).
void init() override
Initializes the threading backend.
ThreadPriority
Abstract thread priority, mapped to each platform's native priority scheme.