Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
Data Structures | Functions
Condition.h File Reference

POSIX Threads conditional variables. More...

#include <Objectively/Date.h>
#include <Objectively/Lock.h>

Go to the source code of this file.

Data Structures

struct  Condition
 POSIX Threads conditional variables. More...
 

Functions

OBJECTIVELY_EXPORT Class_Condition (void)
 

Detailed Description

POSIX Threads conditional variables.

Definition in file Condition.h.

Function Documentation

◆ _Condition()

OBJECTIVELY_EXPORT Class * _Condition ( void  )

Definition at line 141 of file Condition.c.

141 {
142 static Class *clazz;
143 static Once once;
144
145 do_once(&once, {
146 clazz = _initialize(&(const ClassDef) {
147 .name = "Condition",
148 .superclass = _Lock(),
149 .instanceSize = sizeof(Condition),
150 .interfaceOffset = offsetof(Condition, interface),
151 .interfaceSize = sizeof(ConditionInterface),
153 });
154 });
155
156 return clazz;
157}
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition: Class.c:91
static void initialize(Class *clazz)
Definition: Condition.c:126
long Once
The Once type.
Definition: Once.h:37
#define do_once(once, block)
Executes the given block at most one time.
Definition: Once.h:43
ClassDefs are passed to _initialize via an archetype to initialize a Class.
Definition: Class.h:41
The runtime representation of a Class.
Definition: Class.h:95
POSIX Threads conditional variables.
Definition: Condition.h:44
Class * _Lock(void)
The Lock archetype.
Definition: Lock.c:129