====== stdatomic.h ====== [[https://stackoverflow.com/questions/39329311/difference-between-standards-atomic-bool-and-atomic-flag|difference between standard's atomic bool and atomic flag]] ===== atomic_flag ===== > ''atomic_flag'' is an ''atomic boolean'' type variable that is guaranteed to be lock-free. > It is used to provide synchronization within threads in programs. Unlike ''atomic_bool'', > ''atomic_flag'' does not provide load or store operations. [[https://en.cppreference.com/w/c/atomic/atomic_flag|atomic_flag]] ===== atomic vars ===== Atomic variables are not guaranteed to be lock-free. It depends on implementation, e.g: Atomic access can be provided by spin locks. ===== others ===== [[https://en.cppreference.com/w/c/atomic|Atomic operations library]] [[https://docs.oracle.com/cd/E77782_01/html/E77803/stdatomic.h-3a.html|stdatomic.h (3A) ]] [[https://wiki.sei.cmu.edu/confluence/display/c/CON40-C.+Do+not+refer+to+an+atomic+variable+twice+in+an+expression]]