P99
Public Member Functions
p99_once_flag Struct Reference

complete object type that holds a flag for use by p99_call_once More...

#include <p99_threads.h>

Public Member Functions

#define p99_call_once(FLAG, FUNC, ARG)
 Call a function FUNC exactly once eventually by providing it with argument ARG.
#define P99_ONCE_FLAG_INIT   P99_INIT
 expands to a value that can be used to initialize an object of type p99_once_flag

Detailed Description

complete object type that holds a flag for use by p99_call_once

From the wording of the standard it is not clear if a variable of this type must be initialized by means of P99_ONCE_FLAG_INIT. The corresponding POSIX structure requires the analog.

Therefore we don't use the POSIX structure, here, but cook this ourselves with atomic variables. By that we can guarantee that a p99_once_flag that is initialized by the default initializer always has the correct state.

Definition at line 167 of file p99_threads.h.


The documentation for this struct was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines