Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
Classes | Macros | Typedefs
Concurrency

Parallel computing and synchronization via POSIX Threads. More...

Classes

struct  Condition
 POSIX Threads conditional variables. More...
 
struct  Lock
 POSIX Threads locks. More...
 
struct  Operation
 An abstraction for discrete units of work, or tasks. More...
 
struct  OperationQueue
 OperationQueues provide a thread of execution for Operations. More...
 
struct  Thread
 POSIX Threads. More...
 

Macros

#define do_once(once, block)
 Executes the given block at most one time. More...
 

Typedefs

typedef long Once
 The Once type. More...
 

Macro Definition Documentation

◆ do_once

#define do_once (   once,
  block 
)
Value:
if (__sync_val_compare_and_swap(once, 0, -1) == 0) { \
block; *once = 1; \
} else { \
while (*once != 1) ; \
}

Executes the given block at most one time.

Definition at line 43 of file Once.h.

Typedef Documentation

◆ Once

typedef long Once

The Once type.

Definition at line 37 of file Once.h.