Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Typedefs | Functions
Thread.h File Reference

POSIX Threads. More...

#include <Objectively/Object.h>

Go to the source code of this file.

Data Structures

struct  Thread
 POSIX Threads. More...
 

Typedefs

typedef ident(* ThreadFunction) (Thread *thread)
 The function type for Thread execution. More...
 

Functions

OBJECTIVELY_EXPORT Class_Thread (void)
 

Detailed Description

POSIX Threads.

Definition in file Thread.h.

Typedef Documentation

◆ ThreadFunction

typedef ident(* ThreadFunction) (Thread *thread)

The function type for Thread execution.

Parameters
threadThe executing Thread.

Definition at line 45 of file Thread.h.

Function Documentation

◆ _Thread()

OBJECTIVELY_EXPORT Class * _Thread ( void  )

Definition at line 205 of file Thread.c.

205 {
206 static Class *clazz;
207 static Once once;
208
209 do_once(&once, {
210 clazz = _initialize(&(const ClassDef) {
211 .name = "Thread",
212 .superclass = _Object(),
213 .instanceSize = sizeof(Thread),
214 .interfaceOffset = offsetof(Thread, interface),
215 .interfaceSize = sizeof(ThreadInterface),
217 });
218 });
219
220 return clazz;
221}
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition: Class.c:91
static void initialize(Class *clazz)
Definition: Thread.c:186
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
Class * _Object(void)
The Object archetype.
Definition: Object.c:136
POSIX Threads.
Definition: Thread.h:53