From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/c/atomic.html | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 devdocs/c/atomic.html (limited to 'devdocs/c/atomic.html') diff --git a/devdocs/c/atomic.html b/devdocs/c/atomic.html new file mode 100644 index 00000000..e0c45c68 --- /dev/null +++ b/devdocs/c/atomic.html @@ -0,0 +1,109 @@ +

Atomic operations library

If the macro constant __STDC_NO_ATOMICS__(C11) is defined by the compiler, the header <stdatomic.h>, the keyword _Atomic, and all of the names listed here are not provided.

+

Types

+ + +
Defined in header <stdatomic.h>
+
(C11)
defines memory ordering constraints
(enum)
+
(C11)
lock-free atomic boolean flag
(struct)

Macros

+ + + + +
Defined in header <stdatomic.h>
+
(C11)
indicates that the given atomic type is lock-free
(macro constant)
+
(C11)
initializes a new atomic_flag
(macro constant)
+
(C11)(deprecated in C17)(removed in C23)
initializes a new atomic object
(function macro)
+
(C11)
breaks a dependency chain for memory_order_consume
(function macro)

Functions

+ + + + + + + + + + + + + + + +
Defined in header <stdatomic.h>
+
(C11)
sets an atomic_flag to true and returns the old value
(function)
+
(C11)
sets an atomic_flag to false
(function)
+
(C11)
initializes an existing atomic object
(function)
+
(C11)
indicates whether the atomic object is lock-free
(function)
+
(C11)
stores a value in an atomic object
(function)
+
(C11)
reads a value from an atomic object
(function)
+
(C11)
swaps a value with the value of an atomic object
(function)
+
(C11)
swaps a value with an atomic object if the old value is what is expected, otherwise reads the old value
(function)
+
(C11)
atomic addition
(function)
+
(C11)
atomic subtraction
(function)
+
(C11)
atomic bitwise OR
(function)
+
(C11)
atomic bitwise exclusive OR
(function)
+
(C11)
atomic bitwise AND
(function)
+
(C11)
generic memory order-dependent fence synchronization primitive
(function)
+
(C11)
fence between a thread and a signal handler executed in the same thread
(function)

Types

The standard library offers convenience typedefs for the core language atomic types.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Typedef name Full type name
atomic_bool _Atomic _Bool
atomic_char _Atomic char
atomic_schar _Atomic signed char
atomic_uchar _Atomic unsigned char
atomic_short _Atomic short
atomic_ushort _Atomic unsigned short
atomic_int _Atomic int
atomic_uint _Atomic unsigned int
atomic_long _Atomic long
atomic_ulong _Atomic unsigned long
atomic_llong _Atomic long long
atomic_ullong _Atomic unsigned long long
atomic_char8_t (C23) _Atomic char8_t
atomic_char16_t _Atomic char16_t
atomic_char32_t _Atomic char32_t
atomic_wchar_t _Atomic wchar_t
atomic_int_least8_t _Atomic int_least8_t
atomic_uint_least8_t _Atomic uint_least8_t
atomic_int_least16_t _Atomic int_least16_t
atomic_uint_least16_t _Atomic uint_least16_t
atomic_int_least32_t _Atomic int_least32_t
atomic_uint_least32_t _Atomic uint_least32_t
atomic_int_least64_t _Atomic int_least64_t
atomic_uint_least64_t _Atomic uint_least64_t
atomic_int_fast8_t _Atomic int_fast8_t
atomic_uint_fast8_t _Atomic uint_fast8_t
atomic_int_fast16_t _Atomic int_fast16_t
atomic_uint_fast16_t _Atomic uint_fast16_t
atomic_int_fast32_t _Atomic int_fast32_t
atomic_uint_fast32_t _Atomic uint_fast32_t
atomic_int_fast64_t _Atomic int_fast64_t
atomic_uint_fast64_t _Atomic uint_fast64_t
atomic_intptr_t _Atomic intptr_t
atomic_uintptr_t _Atomic uintptr_t
atomic_size_t _Atomic size_t
atomic_ptrdiff_t _Atomic ptrdiff_t
atomic_intmax_t _Atomic intmax_t
atomic_uintmax_t _Atomic uintmax_t

References

See also

+
C++ documentation for Atomic operations library
+

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

+
-- cgit v1.2.3