< C Programming

Summary

The stdatomic.h header defines several macros and declares several types and functions for performing atomic operations on data shared between threads.

Function Overview

Initialization
atomic_initinitializes an atomic object
Fences
atomic_thread_fence
atomic_signal_fence
Lock-Free Property
atomic_is_lock_freeindicates whether or not an atomic object is lock-free
Operations
atomic_storereplaces the value of an atomic object
atomic_loadreturns the value of an atomic object
atomic_exchangereplaces and returns the value of an atomic object
atomic_compare_exchange_strong
atomic_compare_exchange_weak
atomic_fetch_key
atomic_flag_test_and_set
atomic_flag_clear
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.