20#include "objfw-defs.h"
24#if defined(OF_HAVE_PTHREADS)
26typedef pthread_once_t OFOnceControl;
27# define OFOnceControlInitValue PTHREAD_ONCE_INIT
28#elif defined(OF_HAVE_ATOMIC_OPS)
29typedef volatile int OFOnceControl;
30# define OFOnceControlInitValue 0
31#elif defined(OF_AMIGAOS) || !defined(OF_HAVE_THREADS)
32typedef int OFOnceControl;
33# define OFOnceControlInitValue 0
36OF_ASSUME_NONNULL_BEGIN
40typedef void (*OFOnceFunction)(void);
53extern void OFOnce(OFOnceControl *control, OFOnceFunction function);
void OFOnce(OFOnceControl *control, OFOnceFunction function)
Executes the specified function exactly once in the application's lifetime, even in a multi-threaded ...
Definition OFOnce.m:37