On this page
stdatomic.h
Prev: signal.h | Up: stdlib | Next: threads.h
Rel: Synchronization & Coordination, c/builtins
Ref: cppreference — <stdatomic.h>
Tags: #public #prog #c #stdlib #stdatomic #index
Include
#include <stdatomic.h>
Overview
Lock-free atomic operations and memory ordering fences (C11).
Specialized (#tier/specialized)
- atomic_load — Atomically reads (or writes via
atomic_store) an_Atomicvariable with sequential consistency by default. - atomic_fetch_add — Atomically adds
argto*objand returns the previous value without a mutex. - atomic_compare_exchange_weak — Atomically replaces
*objwithdesiredif*obj == *expected(else loads current*objinto*expected).
Linked from
Related notes
- tuts/c/stdlib Linked here; links to this page; shared tags: #c, #index, #prog, #stdlib
- tuts/c/stdlib/signal Linked here; links to this page; shared tags: #c, #index, #prog, #stdlib
- tuts/c/stdlib/stdatomic/atomic_compare_exchange_weak Linked here; links to this page; shared tags: #c, #prog, #stdatomic, #stdlib
- tuts/c/stdlib/stdatomic/atomic_fetch_add Linked here; links to this page; shared tags: #c, #prog, #stdatomic, #stdlib
- tuts/c/stdlib/stdatomic/atomic_load Linked here; links to this page; shared tags: #c, #prog, #stdatomic, #stdlib
- tuts/c/stdlib/threads Linked here; links to this page; shared tags: #c, #index, #prog, #stdlib
- tuts/c/builtins Linked here; shared tags: #c, #index, #prog
- tuts/c/stdlib/signal/signal links to this page; shared tags: #c, #prog, #stdlib
- tuts/c/builtins/_Atomic links to this page; shared tags: #c, #prog
- tuts/c/builtins/volatile links to this page; shared tags: #c, #prog