tmp/tmpljmheakc/{from.md → to.md}
RENAMED
|
@@ -1,40 +1,42 @@
|
|
| 1 |
## Header `<atomic>` synopsis <a id="atomics.syn">[[atomics.syn]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
// [atomics.order], order and consistency
|
| 6 |
-
enum memory_order;
|
| 7 |
template<class T>
|
| 8 |
T kill_dependency(T y) noexcept;
|
| 9 |
|
| 10 |
// [atomics.lockfree], lock-free property
|
| 11 |
#define ATOMIC_BOOL_LOCK_FREE unspecified
|
| 12 |
#define ATOMIC_CHAR_LOCK_FREE unspecified
|
|
|
|
| 13 |
#define ATOMIC_CHAR16_T_LOCK_FREE unspecified
|
| 14 |
#define ATOMIC_CHAR32_T_LOCK_FREE unspecified
|
| 15 |
#define ATOMIC_WCHAR_T_LOCK_FREE unspecified
|
| 16 |
#define ATOMIC_SHORT_LOCK_FREE unspecified
|
| 17 |
#define ATOMIC_INT_LOCK_FREE unspecified
|
| 18 |
#define ATOMIC_LONG_LOCK_FREE unspecified
|
| 19 |
#define ATOMIC_LLONG_LOCK_FREE unspecified
|
| 20 |
#define ATOMIC_POINTER_LOCK_FREE unspecified
|
| 21 |
|
| 22 |
-
// [atomics.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
template<class T> struct atomic;
|
| 24 |
// [atomics.types.pointer], partial specialization for pointers
|
| 25 |
template<class T> struct atomic<T*>;
|
| 26 |
|
| 27 |
// [atomics.nonmembers], non-member functions
|
| 28 |
template<class T>
|
| 29 |
bool atomic_is_lock_free(const volatile atomic<T>*) noexcept;
|
| 30 |
template<class T>
|
| 31 |
bool atomic_is_lock_free(const atomic<T>*) noexcept;
|
| 32 |
-
template<class T>
|
| 33 |
-
void atomic_init(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 34 |
-
template<class T>
|
| 35 |
-
void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 36 |
template<class T>
|
| 37 |
void atomic_store(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 38 |
template<class T>
|
| 39 |
void atomic_store(atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 40 |
template<class T>
|
|
@@ -50,11 +52,11 @@ namespace std {
|
|
| 50 |
template<class T>
|
| 51 |
T atomic_load_explicit(const volatile atomic<T>*, memory_order) noexcept;
|
| 52 |
template<class T>
|
| 53 |
T atomic_load_explicit(const atomic<T>*, memory_order) noexcept;
|
| 54 |
template<class T>
|
| 55 |
-
T atomic_exchange(volatile atomic<T>*, T) noexcept;
|
| 56 |
template<class T>
|
| 57 |
T atomic_exchange(atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 58 |
template<class T>
|
| 59 |
T atomic_exchange_explicit(volatile atomic<T>*, typename atomic<T>::value_type,
|
| 60 |
memory_order) noexcept;
|
|
@@ -147,12 +149,28 @@ namespace std {
|
|
| 147 |
memory_order) noexcept;
|
| 148 |
template<class T>
|
| 149 |
T atomic_fetch_xor_explicit(atomic<T>*, typename atomic<T>::value_type,
|
| 150 |
memory_order) noexcept;
|
| 151 |
|
| 152 |
-
|
| 153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
|
| 155 |
// [atomics.alias], type aliases
|
| 156 |
using atomic_bool = atomic<bool>;
|
| 157 |
using atomic_char = atomic<char>;
|
| 158 |
using atomic_schar = atomic<signed char>;
|
|
@@ -163,10 +181,11 @@ namespace std {
|
|
| 163 |
using atomic_uint = atomic<unsigned int>;
|
| 164 |
using atomic_long = atomic<long>;
|
| 165 |
using atomic_ulong = atomic<unsigned long>;
|
| 166 |
using atomic_llong = atomic<long long>;
|
| 167 |
using atomic_ullong = atomic<unsigned long long>;
|
|
|
|
| 168 |
using atomic_char16_t = atomic<char16_t>;
|
| 169 |
using atomic_char32_t = atomic<char32_t>;
|
| 170 |
using atomic_wchar_t = atomic<wchar_t>;
|
| 171 |
|
| 172 |
using atomic_int8_t = atomic<int8_t>;
|
|
@@ -201,21 +220,39 @@ namespace std {
|
|
| 201 |
using atomic_size_t = atomic<size_t>;
|
| 202 |
using atomic_ptrdiff_t = atomic<ptrdiff_t>;
|
| 203 |
using atomic_intmax_t = atomic<intmax_t>;
|
| 204 |
using atomic_uintmax_t = atomic<uintmax_t>;
|
| 205 |
|
|
|
|
|
|
|
|
|
|
| 206 |
// [atomics.flag], flag type and operations
|
| 207 |
struct atomic_flag;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
bool atomic_flag_test_and_set(volatile atomic_flag*) noexcept;
|
| 209 |
bool atomic_flag_test_and_set(atomic_flag*) noexcept;
|
| 210 |
bool atomic_flag_test_and_set_explicit(volatile atomic_flag*, memory_order) noexcept;
|
| 211 |
bool atomic_flag_test_and_set_explicit(atomic_flag*, memory_order) noexcept;
|
| 212 |
void atomic_flag_clear(volatile atomic_flag*) noexcept;
|
| 213 |
void atomic_flag_clear(atomic_flag*) noexcept;
|
| 214 |
void atomic_flag_clear_explicit(volatile atomic_flag*, memory_order) noexcept;
|
| 215 |
void atomic_flag_clear_explicit(atomic_flag*, memory_order) noexcept;
|
| 216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 217 |
|
| 218 |
// [atomics.fences], fences
|
| 219 |
extern "C" void atomic_thread_fence(memory_order) noexcept;
|
| 220 |
extern "C" void atomic_signal_fence(memory_order) noexcept;
|
| 221 |
}
|
|
|
|
| 1 |
## Header `<atomic>` synopsis <a id="atomics.syn">[[atomics.syn]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
// [atomics.order], order and consistency
|
| 6 |
+
enum class memory_order : unspecified;
|
| 7 |
template<class T>
|
| 8 |
T kill_dependency(T y) noexcept;
|
| 9 |
|
| 10 |
// [atomics.lockfree], lock-free property
|
| 11 |
#define ATOMIC_BOOL_LOCK_FREE unspecified
|
| 12 |
#define ATOMIC_CHAR_LOCK_FREE unspecified
|
| 13 |
+
#define ATOMIC_CHAR8_T_LOCK_FREE unspecified
|
| 14 |
#define ATOMIC_CHAR16_T_LOCK_FREE unspecified
|
| 15 |
#define ATOMIC_CHAR32_T_LOCK_FREE unspecified
|
| 16 |
#define ATOMIC_WCHAR_T_LOCK_FREE unspecified
|
| 17 |
#define ATOMIC_SHORT_LOCK_FREE unspecified
|
| 18 |
#define ATOMIC_INT_LOCK_FREE unspecified
|
| 19 |
#define ATOMIC_LONG_LOCK_FREE unspecified
|
| 20 |
#define ATOMIC_LLONG_LOCK_FREE unspecified
|
| 21 |
#define ATOMIC_POINTER_LOCK_FREE unspecified
|
| 22 |
|
| 23 |
+
// [atomics.ref.generic], class template atomic_ref
|
| 24 |
+
template<class T> struct atomic_ref;
|
| 25 |
+
// [atomics.ref.pointer], partial specialization for pointers
|
| 26 |
+
template<class T> struct atomic_ref<T*>;
|
| 27 |
+
|
| 28 |
+
// [atomics.types.generic], class template atomic
|
| 29 |
template<class T> struct atomic;
|
| 30 |
// [atomics.types.pointer], partial specialization for pointers
|
| 31 |
template<class T> struct atomic<T*>;
|
| 32 |
|
| 33 |
// [atomics.nonmembers], non-member functions
|
| 34 |
template<class T>
|
| 35 |
bool atomic_is_lock_free(const volatile atomic<T>*) noexcept;
|
| 36 |
template<class T>
|
| 37 |
bool atomic_is_lock_free(const atomic<T>*) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
template<class T>
|
| 39 |
void atomic_store(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 40 |
template<class T>
|
| 41 |
void atomic_store(atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 42 |
template<class T>
|
|
|
|
| 52 |
template<class T>
|
| 53 |
T atomic_load_explicit(const volatile atomic<T>*, memory_order) noexcept;
|
| 54 |
template<class T>
|
| 55 |
T atomic_load_explicit(const atomic<T>*, memory_order) noexcept;
|
| 56 |
template<class T>
|
| 57 |
+
T atomic_exchange(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 58 |
template<class T>
|
| 59 |
T atomic_exchange(atomic<T>*, typename atomic<T>::value_type) noexcept;
|
| 60 |
template<class T>
|
| 61 |
T atomic_exchange_explicit(volatile atomic<T>*, typename atomic<T>::value_type,
|
| 62 |
memory_order) noexcept;
|
|
|
|
| 149 |
memory_order) noexcept;
|
| 150 |
template<class T>
|
| 151 |
T atomic_fetch_xor_explicit(atomic<T>*, typename atomic<T>::value_type,
|
| 152 |
memory_order) noexcept;
|
| 153 |
|
| 154 |
+
template<class T>
|
| 155 |
+
void atomic_wait(const volatile atomic<T>*, typename atomic<T>::value_type);
|
| 156 |
+
template<class T>
|
| 157 |
+
void atomic_wait(const atomic<T>*, typename atomic<T>::value_type);
|
| 158 |
+
template<class T>
|
| 159 |
+
void atomic_wait_explicit(const volatile atomic<T>*, typename atomic<T>::value_type,
|
| 160 |
+
memory_order);
|
| 161 |
+
template<class T>
|
| 162 |
+
void atomic_wait_explicit(const atomic<T>*, typename atomic<T>::value_type,
|
| 163 |
+
memory_order);
|
| 164 |
+
template<class T>
|
| 165 |
+
void atomic_notify_one(volatile atomic<T>*);
|
| 166 |
+
template<class T>
|
| 167 |
+
void atomic_notify_one(atomic<T>*);
|
| 168 |
+
template<class T>
|
| 169 |
+
void atomic_notify_all(volatile atomic<T>*);
|
| 170 |
+
template<class T>
|
| 171 |
+
void atomic_notify_all(atomic<T>*);
|
| 172 |
|
| 173 |
// [atomics.alias], type aliases
|
| 174 |
using atomic_bool = atomic<bool>;
|
| 175 |
using atomic_char = atomic<char>;
|
| 176 |
using atomic_schar = atomic<signed char>;
|
|
|
|
| 181 |
using atomic_uint = atomic<unsigned int>;
|
| 182 |
using atomic_long = atomic<long>;
|
| 183 |
using atomic_ulong = atomic<unsigned long>;
|
| 184 |
using atomic_llong = atomic<long long>;
|
| 185 |
using atomic_ullong = atomic<unsigned long long>;
|
| 186 |
+
using atomic_char8_t = atomic<char8_t>;
|
| 187 |
using atomic_char16_t = atomic<char16_t>;
|
| 188 |
using atomic_char32_t = atomic<char32_t>;
|
| 189 |
using atomic_wchar_t = atomic<wchar_t>;
|
| 190 |
|
| 191 |
using atomic_int8_t = atomic<int8_t>;
|
|
|
|
| 220 |
using atomic_size_t = atomic<size_t>;
|
| 221 |
using atomic_ptrdiff_t = atomic<ptrdiff_t>;
|
| 222 |
using atomic_intmax_t = atomic<intmax_t>;
|
| 223 |
using atomic_uintmax_t = atomic<uintmax_t>;
|
| 224 |
|
| 225 |
+
using atomic_signed_lock_free = see below;
|
| 226 |
+
using atomic_unsigned_lock_free = see below;
|
| 227 |
+
|
| 228 |
// [atomics.flag], flag type and operations
|
| 229 |
struct atomic_flag;
|
| 230 |
+
|
| 231 |
+
bool atomic_flag_test(const volatile atomic_flag*) noexcept;
|
| 232 |
+
bool atomic_flag_test(const atomic_flag*) noexcept;
|
| 233 |
+
bool atomic_flag_test_explicit(const volatile atomic_flag*, memory_order) noexcept;
|
| 234 |
+
bool atomic_flag_test_explicit(const atomic_flag*, memory_order) noexcept;
|
| 235 |
bool atomic_flag_test_and_set(volatile atomic_flag*) noexcept;
|
| 236 |
bool atomic_flag_test_and_set(atomic_flag*) noexcept;
|
| 237 |
bool atomic_flag_test_and_set_explicit(volatile atomic_flag*, memory_order) noexcept;
|
| 238 |
bool atomic_flag_test_and_set_explicit(atomic_flag*, memory_order) noexcept;
|
| 239 |
void atomic_flag_clear(volatile atomic_flag*) noexcept;
|
| 240 |
void atomic_flag_clear(atomic_flag*) noexcept;
|
| 241 |
void atomic_flag_clear_explicit(volatile atomic_flag*, memory_order) noexcept;
|
| 242 |
void atomic_flag_clear_explicit(atomic_flag*, memory_order) noexcept;
|
| 243 |
+
|
| 244 |
+
void atomic_flag_wait(const volatile atomic_flag*, bool) noexcept;
|
| 245 |
+
void atomic_flag_wait(const atomic_flag*, bool) noexcept;
|
| 246 |
+
void atomic_flag_wait_explicit(const volatile atomic_flag*,
|
| 247 |
+
bool, memory_order) noexcept;
|
| 248 |
+
void atomic_flag_wait_explicit(const atomic_flag*,
|
| 249 |
+
bool, memory_order) noexcept;
|
| 250 |
+
void atomic_flag_notify_one(volatile atomic_flag*) noexcept;
|
| 251 |
+
void atomic_flag_notify_one(atomic_flag*) noexcept;
|
| 252 |
+
void atomic_flag_notify_all(volatile atomic_flag*) noexcept;
|
| 253 |
+
void atomic_flag_notify_all(atomic_flag*) noexcept;
|
| 254 |
|
| 255 |
// [atomics.fences], fences
|
| 256 |
extern "C" void atomic_thread_fence(memory_order) noexcept;
|
| 257 |
extern "C" void atomic_signal_fence(memory_order) noexcept;
|
| 258 |
}
|