#include "SYS_Compiler.h"
#include "SYS_Deprecated.h"
#include <atomic>
Go to the source code of this file.
#define SYSmemoryFence |
( |
| ) |
|
#define SYSstoreFence |
( |
| ) |
|
constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_ACQ_REL = std::memory_order_acq_rel |
|
inline |
A read-modify-write operation with this memory order is both an acquire operation and a release operation. No memory reads or writes in the current thread can be reordered before the load, nor after the store. All writes in other threads that release the same atomic variable are visible before the modification and the modification is visible in other threads that acquire the same atomic variable.
Definition at line 79 of file SYS_MemoryOrder.h.
constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_ACQUIRE = std::memory_order_acquire |
|
inline |
Prevents any reads by the same thread that follow this in program order from occurring before this read, i.e. a compiler and CPU load fence is placed after the read.
Definition at line 56 of file SYS_MemoryOrder.h.
constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_RELAXED = std::memory_order_relaxed |
|
inline |
Any reordering the compiler or hardware chooses to do is okay.
Definition at line 50 of file SYS_MemoryOrder.h.
constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_RELEASE = std::memory_order_release |
|
inline |
Prevents any writes by the same thread that precede this in program order from occurring after this write, i.e. a compiler and CPU store fence is placed before the write.
Definition at line 66 of file SYS_MemoryOrder.h.
constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_SEQ_CST = std::memory_order_seq_cst |
|
inline |
The current operation will be executed before any loads or stores that follow it in program order and after any loads or stores that precede it. Moreover, sequential consistency is assured meaning that all observers will see this operation in the same order relative to any other MEMORY_ORDER_SEQ_CST operations.
Definition at line 88 of file SYS_MemoryOrder.h.