WUT  0.1
Wii U Toolchain
condition.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include "threadqueue.h"
4 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 typedef struct OSCondition OSCondition;
16 typedef struct OSMutex OSMutex;
17 
18 #define OS_CONDITION_TAG 0x634E6456u
19 
21 {
23  uint32_t tag;
24 
26  const char *name;
27 
28  UNKNOWN(4);
29 
32 };
33 CHECK_OFFSET(OSCondition, 0x00, tag);
34 CHECK_OFFSET(OSCondition, 0x04, name);
35 CHECK_OFFSET(OSCondition, 0x0c, queue);
36 CHECK_SIZE(OSCondition, 0x1c);
37 
38 void
39 OSInitCond(OSCondition *condition);
40 
41 void
42 OSInitCondEx(OSCondition *condition,
43  const char *name);
44 
45 void
46 OSWaitCond(OSCondition *condition,
47  OSMutex *mutex);
48 
49 void
50 OSSignalCond(OSCondition *condition);
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
void OSWaitCond(OSCondition *condition, OSMutex *mutex)
void OSSignalCond(OSCondition *condition)
void OSInitCondEx(OSCondition *condition, const char *name)
void OSInitCond(OSCondition *condition)
Definition: mutex.h:32
OSThreadQueue queue
Queue of threads currently waiting on condition with OSWaitCond.
Definition: condition.h:31
uint32_t tag
Should always be set to the value OS_CONDITION_TAG.
Definition: condition.h:23
const char * name
Name set by OSInitCondEx.
Definition: condition.h:26