ATOMIC_FLAG_INIT

Defined in header <stdatomic.h>
#define ATOMIC_FLAG_INIT /* unspecified */
(since C11)

Expands to an initializer that can be used to initialize atomic_flag type to the clear state. The value atomic_flag that is not initialized using this macro is indeterminate.

Example

#include <stdatomic.h>
 
atomic_flag flag = ATOMIC_FLAG_INIT;

References

See also

ATOMIC_VAR_INIT
(C11)(deprecated in C17)(removed in C23)
initializes a new atomic object
(function macro)
atomic_flag
(C11)
lock-free atomic boolean flag
(struct)
C++ documentation for ATOMIC_FLAG_INIT

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/c/atomic/ATOMIC_FLAG_INIT