Singletons features / single-shot execution.
- Do not include this header file directly, but pthread.h.
Definition in file pthread_once.h.
Go to the source code of this file.
|#define PTHREAD_ONCE_INIT 0
A zeroed out pthread_once_t is initialized.
Definition at line 34 of file pthread_once.h.
Calling pthread_once() changes
once_control. For the same
once_control the supplied
init_routine won't get called again, unless
once_control is reset to PTHREAD_ONCE_INIT or zeroed out.
|[in,out]||once_control||Flag to ensure that the |
init_routine is called only once.
|[in]||init_routine||Function to call if |
once_control was not used, yet.
- 0, this invocation cannot fail.