Objectively
Object oriented framework for 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 206 of file Thread.c.

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