C includes built-in support for threads, atomic operations, mutual exclusion, condition variables, and thread-specific storages.
These features are optionally provided:
__STDC_NO_THREADS__
is defined by the compiler, the header <threads.h> and all of the names provided in it are not provided;__STDC_NO_ATOMICS__
is defined by the compiler, the header <stdatomic.h> and all of the names provided in it are not provided.See also _Atomic
type specifier and qualifier.
atomic_bool
(C11) _Atomic _Bool(until C23)_Atomic bool(since C23) atomic_char
(C11) _Atomic char atomic_schar
(C11) _Atomic signed char atomic_uchar
(C11) _Atomic unsigned char atomic_short
(C11) _Atomic short atomic_ushort
(C11) _Atomic unsigned short atomic_int
(C11) _Atomic int atomic_uint
(C11) _Atomic unsigned int atomic_long
(C11) _Atomic long atomic_ulong
(C11) _Atomic unsigned long atomic_llong
(C11) _Atomic long long atomic_ullong
(C11) _Atomic unsigned long long atomic_char8_t
(C23) _Atomic char8_t atomic_char16_t
(C11) _Atomic char16_t atomic_char32_t
(C11) _Atomic char32_t atomic_wchar_t
(C11) _Atomic wchar_t atomic_int_least8_t
(C11) _Atomic int_least8_t atomic_uint_least8_t
(C11) _Atomic uint_least8_t atomic_int_least16_t
(C11) _Atomic int_least16_t atomic_uint_least16_t
(C11) _Atomic uint_least16_t atomic_int_least32_t
(C11) _Atomic int_least32_t atomic_uint_least32_t
(C11) _Atomic uint_least32_t atomic_int_least64_t
(C11) _Atomic int_least64_t atomic_uint_least64_t
(C11) _Atomic uint_least64_t atomic_int_fast8_t
(C11) _Atomic int_fast8_t atomic_uint_fast8_t
(C11) _Atomic uint_fast8_t atomic_int_fast16_t
(C11) _Atomic int_fast16_t atomic_uint_fast16_t
(C11) _Atomic uint_fast16_t atomic_int_fast32_t
(C11) _Atomic int_fast32_t atomic_uint_fast32_t
(C11) _Atomic uint_fast32_t atomic_int_fast64_t
(C11) _Atomic int_fast64_t atomic_uint_fast64_t
(C11) _Atomic uint_fast64_t atomic_intptr_t
(C11) _Atomic intptr_t atomic_uintptr_t
(C11) _Atomic uintptr_t atomic_size_t
(C11) _Atomic size_t atomic_ptrdiff_t
(C11) _Atomic ptrdiff_t atomic_intmax_t
(C11) _Atomic intmax_t atomic_uintmax_t
(C11) _Atomic uintmax_t [edit] Mutual exclusion [edit] Condition variables [edit] Thread-local storage convenience macro for storage-class specifier _Thread_local
tss_t
thread-specific storage pointer [edit] maximum number of times destructors are called
In future revisions of the C standard:
cnd_
, mtx_
, thrd_
, or tss_
, and a lowercase letter may be added to the declarations in the <threads.h>
header;ATOMIC_
and an uppercase letter may be added to the macros defined in the <stdatomic.h> header;atomic_
or memory_
, and a lowercase letter may be added to the declarations in the <stdatomic.h> header;memory_order_
and a lowercase letter may be added to the definition of the memory_order type in the <stdatomic.h> header;atomic_
and a lowercase letter may be added to the declarations in the <stdatomic.h> header.Identifiers reserved for functions names are always potentially(since C23) reserved for use as identifiers with external linkage, while other identifiers list here are potentially(since C23) reserved when <stdatomic.h> is included.
Declaring, defining, or #undefing such an identifier results in undefined behavior if it is provided by the standard or implementation(since C23). Portable programs should not use those identifiers.
[edit] ReferencesRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4