Atomic operations library
From cppreference.net
<
c
Falls die Makrokonstante
__STDC_NO_ATOMICS__
(C11)
vom Compiler definiert ist, werden der Header
<stdatomic.h>
, das Schlüsselwort
_Atomic
und alle hier aufgeführten Namen nicht bereitgestellt.
Inhaltsverzeichnis |
Typen
|
Definiert im Header
<stdatomic.h>
|
|
|
(C11)
|
definiert Speicherordnungsbeschränkungen
(enum) |
|
(C11)
|
lock-freie atomare boolesche Flagge
(struct) |
Makros
|
Definiert im Header
<stdatomic.h>
|
|
|
zeigt an, dass der gegebene atomare Typ sperrfrei ist
(Makrokonstante) |
|
|
(C11)
|
initialisiert ein neues
atomic_flag
(Makrokonstante) |
|
(C11)
(veraltet in C17)
(entfernt in C23)
|
initialisiert ein neues atomares Objekt
(Funktionsmakro) |
|
(C11)
|
unterbricht eine Abhängigkeitskette für
memory_order_consume
(Funktionsmakro) |
Funktionen
|
Definiert im Header
<stdatomic.h>
|
|
|
setzt ein atomic_flag auf true und gibt den alten Wert zurück
(Funktion) |
|
|
setzt ein atomic_flag auf false
(Funktion) |
|
|
(C11)
|
initialisiert ein existierendes atomares Objekt
(Funktion) |
|
(C11)
|
zeigt an, ob das atomare Objekt sperrfrei ist
(Funktion) |
|
speichert einen Wert in einem atomaren Objekt
(Funktion) |
|
|
liest einen Wert aus einem atomaren Objekt
(Funktion) |
|
|
tauscht einen Wert mit dem Wert eines atomaren Objekts aus
(Funktion) |
|
|
tauscht einen Wert mit einem atomaren Objekt aus, wenn der alte Wert dem erwarteten entspricht, andernfalls wird der alte Wert gelesen
(Funktion) |
|
|
atomare Addition
(Funktion) |
|
|
atomare Subtraktion
(Funktion) |
|
|
atomares bitweises OR
(Funktion) |
|
|
atomares bitweises exklusives OR
(Funktion) |
|
|
atomares bitweises AND
(Funktion) |
|
|
(C11)
|
generische speicherreihenfolgeabhängige Fence-Synchronisationsprimitive
(Funktion) |
|
(C11)
|
Fence zwischen einem Thread und einem Signal-Handler, der im selben Thread ausgeführt wird
(Funktion) |
Typen
Die Standardbibliothek bietet praktische Typdefinitionen für die atomaren Basissprachtypen .
| Typedef-Name | Vollständiger Typname |
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 |
Referenzen
- C23 Standard (ISO/IEC 9899:2024):
-
- 7.17 Atomics <stdatomic.h> (S.: TBD)
-
- 7.31.8 Atomics <stdatomic.h> (S.: TBD)
- C17-Standard (ISO/IEC 9899:2018):
-
- 7.17 Atomics <stdatomic.h> (S: TBD)
-
- 7.31.8 Atomics <stdatomic.h> (S: TBD)
- C11-Standard (ISO/IEC 9899:2011):
-
- 7.17 Atomics <stdatomic.h> (S: 273-286)
-
- 7.31.8 Atomics <stdatomic.h> (S: 455-456)
Siehe auch
|
C++ Dokumentation
für
Atomic operations library
|