| 165 | } |
| 166 | |
| 167 | void Atomic<int32_t>::store(int32_t desired, memory_order mem) |
| 168 | { |
| 169 | #if _MSC_VER |
| 170 | if (mem == memory_order_seq_cst) |
| 171 | { |
| 172 | (void)_InterlockedExchange(reinterpret_cast<volatile long*>(&value), desired); |
| 173 | } |
| 174 | else |
| 175 | { |
| 176 | SC_COMPILER_MSVC_ATOMIC_STORE_VERIFY_MEMORY_ORDER(mem); |
| 177 | __iso_volatile_store32(reinterpret_cast<volatile int*>(&value), desired); |
| 178 | } |
| 179 | #else |
| 180 | __atomic_store_n(&value, desired, mem); |
| 181 | #endif |
| 182 | } |
| 183 | |
| 184 | int32_t Atomic<int32_t>::exchange(int32_t desired, memory_order mem) |
| 185 | { |
no outgoing calls