HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_MemoryOrder.h File Reference
#include "SYS_Compiler.h"
#include "SYS_Deprecated.h"
#include <atomic>
+ Include dependency graph for SYS_MemoryOrder.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SYSloadFence()
 
#define SYSstoreFence()
 
#define SYSmemoryFence()
 

Typedefs

using SYS_MemoryOrder = std::memory_order
 

Variables

constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_RELAXED = std::memory_order_relaxed
 Any reordering the compiler or hardware chooses to do is okay. More...
 
constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_ACQUIRE = std::memory_order_acquire
 
constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_LOAD = SYS_MEMORY_ORDER_ACQUIRE
 
constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_RELEASE = std::memory_order_release
 
constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_STORE = SYS_MEMORY_ORDER_RELEASE
 
constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_ACQ_REL = std::memory_order_acq_rel
 
constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_SEQ_CST = std::memory_order_seq_cst
 

Macro Definition Documentation

#define SYSloadFence ( )

Definition at line 39 of file SYS_MemoryOrder.h.

#define SYSmemoryFence ( )

Definition at line 41 of file SYS_MemoryOrder.h.

#define SYSstoreFence ( )

Definition at line 40 of file SYS_MemoryOrder.h.

Typedef Documentation

using SYS_MemoryOrder = std::memory_order

Definition at line 46 of file SYS_MemoryOrder.h.

Variable Documentation

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_LOAD = SYS_MEMORY_ORDER_ACQUIRE
inline

Definition at line 60 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.

constexpr SYS_MemoryOrder SYS_MEMORY_ORDER_STORE = SYS_MEMORY_ORDER_RELEASE
inline

Definition at line 70 of file SYS_MemoryOrder.h.