P99
|
complete object type that holds a flag for use by p99_call_once More...
#include <p99_threads.h>
complete object type that holds a flag for use by p99_call_once
From the wording of the standard it is not clear whether 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. In this way we can guarantee that a p99_once_flag that is initialized by the default initializer always has the correct state.
Definition at line 62 of file p99_threads.h.