Objectively
Ultra-lightweight object oriented framework for GNU C.
Loading...
Searching...
No Matches
Thread.h File Reference

POSIX Threads. More...

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.
 

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:86
Class * _Object(void)
Definition Object.c:136
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
POSIX Threads.
Definition Thread.h:53