diff --git a/source/threads.tex b/source/threads.tex index 3cbfd3b134..db30cf641a 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -2406,417 +2406,354 @@ \indexheader{atomic}% \begin{codeblock} +// mostly freestanding namespace std { // \ref{atomics.order}, order and consistency - enum class memory_order : @\unspecnc@; // freestanding - inline constexpr memory_order memory_order_relaxed = memory_order::relaxed; // freestanding - inline constexpr memory_order memory_order_acquire = memory_order::acquire; // freestanding - inline constexpr memory_order memory_order_release = memory_order::release; // freestanding - inline constexpr memory_order memory_order_acq_rel = memory_order::acq_rel; // freestanding - inline constexpr memory_order memory_order_seq_cst = memory_order::seq_cst; // freestanding + enum class memory_order : @\unspecnc@; + inline constexpr memory_order memory_order_relaxed = memory_order::relaxed; + inline constexpr memory_order memory_order_acquire = memory_order::acquire; + inline constexpr memory_order memory_order_release = memory_order::release; + inline constexpr memory_order memory_order_acq_rel = memory_order::acq_rel; + inline constexpr memory_order memory_order_seq_cst = memory_order::seq_cst; } // \ref{atomics.lockfree}, lock-free property -#define @\libmacro{ATOMIC_BOOL_LOCK_FREE}@ @\unspecnc@ // freestanding -#define @\libmacro{ATOMIC_CHAR_LOCK_FREE}@ @\unspecnc@ // freestanding -#define @\libmacro{ATOMIC_CHAR8_T_LOCK_FREE}@ @\unspecnc@ // freestanding -#define @\libmacro{ATOMIC_CHAR16_T_LOCK_FREE}@ @\unspecnc@ // freestanding -#define @\libmacro{ATOMIC_CHAR32_T_LOCK_FREE}@ @\unspecnc@ // freestanding -#define @\libmacro{ATOMIC_WCHAR_T_LOCK_FREE}@ @\unspecnc@ // freestanding -#define @\libmacro{ATOMIC_SHORT_LOCK_FREE}@ @\unspecnc@ // freestanding -#define @\libmacro{ATOMIC_INT_LOCK_FREE}@ @\unspecnc@ // freestanding -#define @\libmacro{ATOMIC_LONG_LOCK_FREE}@ @\unspecnc@ // freestanding -#define @\libmacro{ATOMIC_LLONG_LOCK_FREE}@ @\unspecnc@ // freestanding -#define @\libmacro{ATOMIC_POINTER_LOCK_FREE}@ @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_BOOL_LOCK_FREE}@ @\unspecnc@ +#define @\libmacro{ATOMIC_CHAR_LOCK_FREE}@ @\unspecnc@ +#define @\libmacro{ATOMIC_CHAR8_T_LOCK_FREE}@ @\unspecnc@ +#define @\libmacro{ATOMIC_CHAR16_T_LOCK_FREE}@ @\unspecnc@ +#define @\libmacro{ATOMIC_CHAR32_T_LOCK_FREE}@ @\unspecnc@ +#define @\libmacro{ATOMIC_WCHAR_T_LOCK_FREE}@ @\unspecnc@ +#define @\libmacro{ATOMIC_SHORT_LOCK_FREE}@ @\unspecnc@ +#define @\libmacro{ATOMIC_INT_LOCK_FREE}@ @\unspecnc@ +#define @\libmacro{ATOMIC_LONG_LOCK_FREE}@ @\unspecnc@ +#define @\libmacro{ATOMIC_LLONG_LOCK_FREE}@ @\unspecnc@ +#define @\libmacro{ATOMIC_POINTER_LOCK_FREE}@ @\unspecnc@ namespace std { // \ref{atomics.ref.generic}, class template \tcode{atomic_ref} - template struct atomic_ref; // freestanding + template struct atomic_ref; // \ref{atomics.types.generic}, class template \tcode{atomic} - template struct atomic; // freestanding + template struct atomic; // \ref{atomics.types.pointer}, partial specialization for pointers - template struct atomic; // freestanding + template struct atomic; // \ref{atomics.nonmembers}, non-member functions template - bool atomic_is_lock_free(const volatile atomic*) noexcept; // freestanding + bool atomic_is_lock_free(const volatile atomic*) noexcept; template - bool atomic_is_lock_free(const atomic*) noexcept; // freestanding + bool atomic_is_lock_free(const atomic*) noexcept; template - void atomic_store(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + void atomic_store(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr void atomic_store(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr void atomic_store(atomic*, typename atomic::value_type) noexcept; template - void atomic_store_explicit(volatile atomic*, // freestanding - typename atomic::value_type, memory_order) noexcept; + void atomic_store_explicit(volatile atomic*, typename atomic::value_type, + memory_order) noexcept; template - constexpr void atomic_store_explicit(atomic*, // freestanding - typename atomic::value_type, memory_order) noexcept; + constexpr void atomic_store_explicit(atomic*, typename atomic::value_type, + memory_order) noexcept; template - T atomic_load(const volatile atomic*) noexcept; // freestanding + T atomic_load(const volatile atomic*) noexcept; template - constexpr T atomic_load(const atomic*) noexcept; // freestanding + constexpr T atomic_load(const atomic*) noexcept; template - T atomic_load_explicit(const volatile atomic*, memory_order) noexcept; // freestanding + T atomic_load_explicit(const volatile atomic*, memory_order) noexcept; template - constexpr T atomic_load_explicit(const atomic*, memory_order) noexcept; // freestanding + constexpr T atomic_load_explicit(const atomic*, memory_order) noexcept; template - T atomic_exchange(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + T atomic_exchange(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr T atomic_exchange(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr T atomic_exchange(atomic*, typename atomic::value_type) noexcept; template - T atomic_exchange_explicit(volatile atomic*, // freestanding - typename atomic::value_type, memory_order) noexcept; + T atomic_exchange_explicit(volatile atomic*, typename atomic::value_type, + memory_order) noexcept; template - constexpr T atomic_exchange_explicit(atomic*, // freestanding - typename atomic::value_type, + constexpr T atomic_exchange_explicit(atomic*, typename atomic::value_type, memory_order) noexcept; template - bool atomic_compare_exchange_weak(volatile atomic*, // freestanding + bool atomic_compare_exchange_weak(volatile atomic*, typename atomic::value_type*, typename atomic::value_type) noexcept; template - constexpr bool atomic_compare_exchange_weak(atomic*, // freestanding + constexpr bool atomic_compare_exchange_weak(atomic*, typename atomic::value_type*, typename atomic::value_type) noexcept; template - bool atomic_compare_exchange_strong(volatile atomic*, // freestanding + bool atomic_compare_exchange_strong(volatile atomic*, typename atomic::value_type*, typename atomic::value_type) noexcept; template - constexpr bool atomic_compare_exchange_strong(atomic*, // freestanding + constexpr bool atomic_compare_exchange_strong(atomic*, typename atomic::value_type*, typename atomic::value_type) noexcept; template - bool atomic_compare_exchange_weak_explicit(volatile atomic*, // freestanding + bool atomic_compare_exchange_weak_explicit(volatile atomic*, typename atomic::value_type*, typename atomic::value_type, memory_order, memory_order) noexcept; template - constexpr bool atomic_compare_exchange_weak_explicit(atomic*, // freestanding + constexpr bool atomic_compare_exchange_weak_explicit(atomic*, typename atomic::value_type*, typename atomic::value_type, memory_order, memory_order) noexcept; template - bool atomic_compare_exchange_strong_explicit(volatile atomic*, // freestanding + bool atomic_compare_exchange_strong_explicit(volatile atomic*, typename atomic::value_type*, typename atomic::value_type, memory_order, memory_order) noexcept; template - constexpr bool atomic_compare_exchange_strong_explicit(atomic*, // freestanding + constexpr bool atomic_compare_exchange_strong_explicit(atomic*, typename atomic::value_type*, typename atomic::value_type, memory_order, memory_order) noexcept; template - T atomic_fetch_add(volatile atomic*, // freestanding - typename atomic::difference_type) noexcept; + T atomic_fetch_add(volatile atomic*, typename atomic::difference_type) noexcept; template - constexpr T atomic_fetch_add(atomic*, // freestanding - typename atomic::difference_type) noexcept; + constexpr T atomic_fetch_add(atomic*, typename atomic::difference_type) noexcept; template - T atomic_fetch_add_explicit(volatile atomic*, // freestanding - typename atomic::difference_type, + T atomic_fetch_add_explicit(volatile atomic*, typename atomic::difference_type, memory_order) noexcept; template - constexpr T atomic_fetch_add_explicit(atomic*, // freestanding - typename atomic::difference_type, + constexpr T atomic_fetch_add_explicit(atomic*, typename atomic::difference_type, memory_order) noexcept; template - T atomic_fetch_sub(volatile atomic*, // freestanding - typename atomic::difference_type) noexcept; + T atomic_fetch_sub(volatile atomic*, typename atomic::difference_type) noexcept; template - constexpr T atomic_fetch_sub(atomic*, // freestanding - typename atomic::difference_type) noexcept; + constexpr T atomic_fetch_sub(atomic*, typename atomic::difference_type) noexcept; template - T atomic_fetch_sub_explicit(volatile atomic*, // freestanding - typename atomic::difference_type, + T atomic_fetch_sub_explicit(volatile atomic*, typename atomic::difference_type, memory_order) noexcept; template - constexpr T atomic_fetch_sub_explicit(atomic*, // freestanding - typename atomic::difference_type, + constexpr T atomic_fetch_sub_explicit(atomic*, typename atomic::difference_type, memory_order) noexcept; template - T atomic_fetch_and(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + T atomic_fetch_and(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr T atomic_fetch_and(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr T atomic_fetch_and(atomic*, typename atomic::value_type) noexcept; template - T atomic_fetch_and_explicit(volatile atomic*, // freestanding - typename atomic::value_type, + T atomic_fetch_and_explicit(volatile atomic*, typename atomic::value_type, memory_order) noexcept; template - constexpr T atomic_fetch_and_explicit(atomic*, // freestanding - typename atomic::value_type, + constexpr T atomic_fetch_and_explicit(atomic*, typename atomic::value_type, memory_order) noexcept; template - T atomic_fetch_or(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + T atomic_fetch_or(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr T atomic_fetch_or(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr T atomic_fetch_or(atomic*, typename atomic::value_type) noexcept; template - T atomic_fetch_or_explicit(volatile atomic*, // freestanding - typename atomic::value_type, + T atomic_fetch_or_explicit(volatile atomic*, typename atomic::value_type, memory_order) noexcept; template - constexpr T atomic_fetch_or_explicit(atomic*, // freestanding - typename atomic::value_type, + constexpr T atomic_fetch_or_explicit(atomic*, typename atomic::value_type, memory_order) noexcept; template - T atomic_fetch_xor(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + T atomic_fetch_xor(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr T atomic_fetch_xor(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr T atomic_fetch_xor(atomic*, typename atomic::value_type) noexcept; template - T atomic_fetch_xor_explicit(volatile atomic*, // freestanding - typename atomic::value_type, + T atomic_fetch_xor_explicit(volatile atomic*, typename atomic::value_type, memory_order) noexcept; template - constexpr T atomic_fetch_xor_explicit(atomic*, // freestanding - typename atomic::value_type, + constexpr T atomic_fetch_xor_explicit(atomic*, typename atomic::value_type, memory_order) noexcept; template - T atomic_fetch_max(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + T atomic_fetch_max(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr T atomic_fetch_max(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr T atomic_fetch_max(atomic*, typename atomic::value_type) noexcept; template - T atomic_fetch_max_explicit(volatile atomic*, // freestanding - typename atomic::value_type, + T atomic_fetch_max_explicit(volatile atomic*, typename atomic::value_type, memory_order) noexcept; template - constexpr T atomic_fetch_max_explicit(atomic*, // freestanding - typename atomic::value_type, + constexpr T atomic_fetch_max_explicit(atomic*, typename atomic::value_type, memory_order) noexcept; template - T atomic_fetch_min(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + T atomic_fetch_min(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr T atomic_fetch_min(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr T atomic_fetch_min(atomic*, typename atomic::value_type) noexcept; template - T atomic_fetch_min_explicit(volatile atomic*, // freestanding - typename atomic::value_type, + T atomic_fetch_min_explicit(volatile atomic*, typename atomic::value_type, memory_order) noexcept; template - constexpr T atomic_fetch_min_explicit(atomic*, // freestanding - typename atomic::value_type, + constexpr T atomic_fetch_min_explicit(atomic*, typename atomic::value_type, memory_order) noexcept; template - void atomic_store_add(volatile atomic*, // freestanding - typename atomic::difference_type) noexcept; + void atomic_store_add(volatile atomic*, typename atomic::difference_type) noexcept; template - constexpr void atomic_store_add(atomic*, // freestanding - typename atomic::difference_type) noexcept; + constexpr void atomic_store_add(atomic*, typename atomic::difference_type) noexcept; template - void atomic_store_add_explicit(volatile atomic*, // freestanding - typename atomic::difference_type, memory_order) noexcept; + void atomic_store_add_explicit(volatile atomic*, typename atomic::difference_type, + memory_order) noexcept; template - constexpr void atomic_store_add_explicit(atomic*, // freestanding - typename atomic::difference_type, + constexpr void atomic_store_add_explicit(atomic*, typename atomic::difference_type, memory_order) noexcept; template - void atomic_store_sub(volatile atomic*, // freestanding - typename atomic::difference_type) noexcept; + void atomic_store_sub(volatile atomic*, typename atomic::difference_type) noexcept; template - constexpr void atomic_store_sub(atomic*, // freestanding - typename atomic::difference_type) noexcept; + constexpr void atomic_store_sub(atomic*, typename atomic::difference_type) noexcept; template - void atomic_store_sub_explicit(volatile atomic*, // freestanding - typename atomic::difference_type, memory_order) noexcept; + void atomic_store_sub_explicit(volatile atomic*, typename atomic::difference_type, + memory_order) noexcept; template - constexpr void atomic_store_sub_explicit(atomic*, // freestanding - typename atomic::difference_type, + constexpr void atomic_store_sub_explicit(atomic*, typename atomic::difference_type, memory_order) noexcept; template - void atomic_store_and(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + void atomic_store_and(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr void atomic_store_and(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr void atomic_store_and(atomic*, typename atomic::value_type) noexcept; template - void atomic_store_and_explicit(volatile atomic*, // freestanding - typename atomic::value_type, memory_order) noexcept; + void atomic_store_and_explicit(volatile atomic*, typename atomic::value_type, + memory_order) noexcept; template - constexpr void atomic_store_and_explicit(atomic*, // freestanding - typename atomic::value_type, + constexpr void atomic_store_and_explicit(atomic*, typename atomic::value_type, memory_order) noexcept; template - void atomic_store_or(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + void atomic_store_or(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr void atomic_store_or(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr void atomic_store_or(atomic*, typename atomic::value_type) noexcept; template - void atomic_store_or_explicit(volatile atomic*, // freestanding - typename atomic::value_type, memory_order) noexcept; + void atomic_store_or_explicit(volatile atomic*, typename atomic::value_type, + memory_order) noexcept; template - constexpr void atomic_store_or_explicit(atomic*, // freestanding - typename atomic::value_type, + constexpr void atomic_store_or_explicit(atomic*, typename atomic::value_type, memory_order) noexcept; template - void atomic_store_xor(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + void atomic_store_xor(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr void atomic_store_xor(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr void atomic_store_xor(atomic*, typename atomic::value_type) noexcept; template - void atomic_store_xor_explicit(volatile atomic*, // freestanding - typename atomic::value_type, memory_order) noexcept; + void atomic_store_xor_explicit(volatile atomic*, typename atomic::value_type, + memory_order) noexcept; template - constexpr void atomic_store_xor_explicit(atomic*, // freestanding - typename atomic::value_type, + constexpr void atomic_store_xor_explicit(atomic*, typename atomic::value_type, memory_order) noexcept; template - void atomic_store_max(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + void atomic_store_max(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr void atomic_store_max(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr void atomic_store_max(atomic*, typename atomic::value_type) noexcept; template - void atomic_store_max_explicit(volatile atomic*, // freestanding - typename atomic::value_type, memory_order) noexcept; + void atomic_store_max_explicit(volatile atomic*, typename atomic::value_type, + memory_order) noexcept; template - constexpr void atomic_store_max_explicit(atomic*, // freestanding - typename atomic::value_type, + constexpr void atomic_store_max_explicit(atomic*, typename atomic::value_type, memory_order) noexcept; template - void atomic_store_min(volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + void atomic_store_min(volatile atomic*, typename atomic::value_type) noexcept; template - constexpr void atomic_store_min(atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr void atomic_store_min(atomic*, typename atomic::value_type) noexcept; template - void atomic_store_min_explicit(volatile atomic*, // freestanding - typename atomic::value_type, memory_order) noexcept; + void atomic_store_min_explicit(volatile atomic*, typename atomic::value_type, + memory_order) noexcept; template - constexpr void atomic_store_min_explicit(atomic*, // freestanding - typename atomic::value_type, + constexpr void atomic_store_min_explicit(atomic*, typename atomic::value_type, memory_order) noexcept; template - void atomic_wait(const volatile atomic*, // freestanding - typename atomic::value_type) noexcept; + void atomic_wait(const volatile atomic*, typename atomic::value_type) noexcept; template - constexpr void atomic_wait(const atomic*, // freestanding - typename atomic::value_type) noexcept; + constexpr void atomic_wait(const atomic*, typename atomic::value_type) noexcept; template - void atomic_wait_explicit(const volatile atomic*, // freestanding - typename atomic::value_type, + void atomic_wait_explicit(const volatile atomic*, typename atomic::value_type, memory_order) noexcept; template - constexpr void atomic_wait_explicit(const atomic*, // freestanding - typename atomic::value_type, + constexpr void atomic_wait_explicit(const atomic*, typename atomic::value_type, memory_order) noexcept; template - void atomic_notify_one(volatile atomic*) noexcept; // freestanding + void atomic_notify_one(volatile atomic*) noexcept; template - constexpr void atomic_notify_one(atomic*) noexcept; // freestanding + constexpr void atomic_notify_one(atomic*) noexcept; template - void atomic_notify_all(volatile atomic*) noexcept; // freestanding + void atomic_notify_all(volatile atomic*) noexcept; template - constexpr void atomic_notify_all(atomic*) noexcept; // freestanding + constexpr void atomic_notify_all(atomic*) noexcept; // \ref{atomics.alias}, type aliases - using atomic_bool = atomic; // freestanding - using atomic_char = atomic; // freestanding - using atomic_schar = atomic; // freestanding - using atomic_uchar = atomic; // freestanding - using atomic_short = atomic; // freestanding - using atomic_ushort = atomic; // freestanding - using atomic_int = atomic; // freestanding - using atomic_uint = atomic; // freestanding - using atomic_long = atomic; // freestanding - using atomic_ulong = atomic; // freestanding - using atomic_llong = atomic; // freestanding - using atomic_ullong = atomic; // freestanding - using atomic_char8_t = atomic; // freestanding - using atomic_char16_t = atomic; // freestanding - using atomic_char32_t = atomic; // freestanding - using atomic_wchar_t = atomic; // freestanding - - using atomic_int8_t = atomic; // freestanding - using atomic_uint8_t = atomic; // freestanding - using atomic_int16_t = atomic; // freestanding - using atomic_uint16_t = atomic; // freestanding - using atomic_int32_t = atomic; // freestanding - using atomic_uint32_t = atomic; // freestanding - using atomic_int64_t = atomic; // freestanding - using atomic_uint64_t = atomic; // freestanding - - using atomic_int_least8_t = atomic; // freestanding - using atomic_uint_least8_t = atomic; // freestanding - using atomic_int_least16_t = atomic; // freestanding - using atomic_uint_least16_t = atomic; // freestanding - using atomic_int_least32_t = atomic; // freestanding - using atomic_uint_least32_t = atomic; // freestanding - using atomic_int_least64_t = atomic; // freestanding - using atomic_uint_least64_t = atomic; // freestanding - - using atomic_int_fast8_t = atomic; // freestanding - using atomic_uint_fast8_t = atomic; // freestanding - using atomic_int_fast16_t = atomic; // freestanding - using atomic_uint_fast16_t = atomic; // freestanding - using atomic_int_fast32_t = atomic; // freestanding - using atomic_uint_fast32_t = atomic; // freestanding - using atomic_int_fast64_t = atomic; // freestanding - using atomic_uint_fast64_t = atomic; // freestanding - - using atomic_intptr_t = atomic; // freestanding - using atomic_uintptr_t = atomic; // freestanding - using atomic_size_t = atomic; // freestanding - using atomic_ptrdiff_t = atomic; // freestanding - using atomic_intmax_t = atomic; // freestanding - using atomic_uintmax_t = atomic; // freestanding - - using atomic_signed_lock_free = @\seebelow@; - using atomic_unsigned_lock_free = @\seebelow@; + using atomic_bool = atomic; + using atomic_char = atomic; + using atomic_schar = atomic; + using atomic_uchar = atomic; + using atomic_short = atomic; + using atomic_ushort = atomic; + using atomic_int = atomic; + using atomic_uint = atomic; + using atomic_long = atomic; + using atomic_ulong = atomic; + using atomic_llong = atomic; + using atomic_ullong = atomic; + using atomic_char8_t = atomic; + using atomic_char16_t = atomic; + using atomic_char32_t = atomic; + using atomic_wchar_t = atomic; + + using atomic_int8_t = atomic; + using atomic_uint8_t = atomic; + using atomic_int16_t = atomic; + using atomic_uint16_t = atomic; + using atomic_int32_t = atomic; + using atomic_uint32_t = atomic; + using atomic_int64_t = atomic; + using atomic_uint64_t = atomic; + + using atomic_int_least8_t = atomic; + using atomic_uint_least8_t = atomic; + using atomic_int_least16_t = atomic; + using atomic_uint_least16_t = atomic; + using atomic_int_least32_t = atomic; + using atomic_uint_least32_t = atomic; + using atomic_int_least64_t = atomic; + using atomic_uint_least64_t = atomic; + + using atomic_int_fast8_t = atomic; + using atomic_uint_fast8_t = atomic; + using atomic_int_fast16_t = atomic; + using atomic_uint_fast16_t = atomic; + using atomic_int_fast32_t = atomic; + using atomic_uint_fast32_t = atomic; + using atomic_int_fast64_t = atomic; + using atomic_uint_fast64_t = atomic; + + using atomic_intptr_t = atomic; + using atomic_uintptr_t = atomic; + using atomic_size_t = atomic; + using atomic_ptrdiff_t = atomic; + using atomic_intmax_t = atomic; + using atomic_uintmax_t = atomic; + + using atomic_signed_lock_free = @\seebelow@; // hosted + using atomic_unsigned_lock_free = @\seebelow@; // hosted // \ref{atomics.flag}, flag type and operations - struct atomic_flag; // freestanding - - bool atomic_flag_test(const volatile atomic_flag*) noexcept; // freestanding - constexpr bool atomic_flag_test(const atomic_flag*) noexcept; // freestanding - bool atomic_flag_test_explicit(const volatile atomic_flag*, // freestanding - memory_order) noexcept; - constexpr bool atomic_flag_test_explicit(const atomic_flag*, // freestanding - memory_order) noexcept; - bool atomic_flag_test_and_set(volatile atomic_flag*) noexcept; // freestanding - constexpr bool atomic_flag_test_and_set(atomic_flag*) noexcept; // freestanding - bool atomic_flag_test_and_set_explicit(volatile atomic_flag*, // freestanding - memory_order) noexcept; - constexpr bool atomic_flag_test_and_set_explicit(atomic_flag*, // freestanding - memory_order) noexcept; - void atomic_flag_clear(volatile atomic_flag*) noexcept; // freestanding - constexpr void atomic_flag_clear(atomic_flag*) noexcept; // freestanding - void atomic_flag_clear_explicit(volatile atomic_flag*, memory_order) noexcept; // freestanding - constexpr void atomic_flag_clear_explicit(atomic_flag*, memory_order) noexcept; // freestanding - - void atomic_flag_wait(const volatile atomic_flag*, bool) noexcept; // freestanding - constexpr void atomic_flag_wait(const atomic_flag*, bool) noexcept; // freestanding - void atomic_flag_wait_explicit(const volatile atomic_flag*, // freestanding - bool, memory_order) noexcept; - constexpr void atomic_flag_wait_explicit(const atomic_flag*, // freestanding - bool, memory_order) noexcept; - void atomic_flag_notify_one(volatile atomic_flag*) noexcept; // freestanding - constexpr void atomic_flag_notify_one(atomic_flag*) noexcept; // freestanding - void atomic_flag_notify_all(volatile atomic_flag*) noexcept; // freestanding - constexpr void atomic_flag_notify_all(atomic_flag*) noexcept; // freestanding - #define @\libmacro{ATOMIC_FLAG_INIT}@ @\seebelownc@ // freestanding + struct atomic_flag; + + bool atomic_flag_test(const volatile atomic_flag*) noexcept; + constexpr bool atomic_flag_test(const atomic_flag*) noexcept; + bool atomic_flag_test_explicit(const volatile atomic_flag*, memory_order) noexcept; + constexpr bool atomic_flag_test_explicit(const atomic_flag*, memory_order) noexcept; + bool atomic_flag_test_and_set(volatile atomic_flag*) noexcept; + constexpr bool atomic_flag_test_and_set(atomic_flag*) noexcept; + bool atomic_flag_test_and_set_explicit(volatile atomic_flag*, memory_order) noexcept; + constexpr bool atomic_flag_test_and_set_explicit(atomic_flag*, memory_order) noexcept; + void atomic_flag_clear(volatile atomic_flag*) noexcept; + constexpr void atomic_flag_clear(atomic_flag*) noexcept; + void atomic_flag_clear_explicit(volatile atomic_flag*, memory_order) noexcept; + constexpr void atomic_flag_clear_explicit(atomic_flag*, memory_order) noexcept; + + void atomic_flag_wait(const volatile atomic_flag*, bool) noexcept; + constexpr void atomic_flag_wait(const atomic_flag*, bool) noexcept; + void atomic_flag_wait_explicit(const volatile atomic_flag*, bool, memory_order) noexcept; + constexpr void atomic_flag_wait_explicit(const atomic_flag*, bool, memory_order) noexcept; + void atomic_flag_notify_one(volatile atomic_flag*) noexcept; + constexpr void atomic_flag_notify_one(atomic_flag*) noexcept; + void atomic_flag_notify_all(volatile atomic_flag*) noexcept; + constexpr void atomic_flag_notify_all(atomic_flag*) noexcept; + #define @\libmacro{ATOMIC_FLAG_INIT}@ @\seebelownc@ // \ref{atomics.fences}, fences - extern "C" constexpr void atomic_thread_fence(memory_order) noexcept; // freestanding - extern "C" constexpr void atomic_signal_fence(memory_order) noexcept; // freestanding + extern "C" constexpr void atomic_thread_fence(memory_order) noexcept; + extern "C" constexpr void atomic_signal_fence(memory_order) noexcept; } \end{codeblock}