aboutsummaryrefslogtreecommitdiffstats
path: root/include/jau/ordered_atomic.hpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-06-22 02:57:14 +0200
committerSven Gothel <[email protected]>2021-06-22 02:57:14 +0200
commitc06b672017677ab01e5ddce0e2977d68a9203195 (patch)
tree4af122bcf47975e9f306472d7cc85a3f3a4727e3 /include/jau/ordered_atomic.hpp
parent4d5c2ff4886fa3e6a693ee32883d0fafb998c1a1 (diff)
ordered_atomic: Complete sc_atomic_* and relaxed_atomic_* for int8_t int16_t, int32_t, uint32_t, int64_t and uint64_t
Diffstat (limited to 'include/jau/ordered_atomic.hpp')
-rw-r--r--include/jau/ordered_atomic.hpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/jau/ordered_atomic.hpp b/include/jau/ordered_atomic.hpp
index cdafc55..8b855be 100644
--- a/include/jau/ordered_atomic.hpp
+++ b/include/jau/ordered_atomic.hpp
@@ -215,12 +215,24 @@ template <typename _Tp, std::memory_order _MO> struct ordered_atomic : private s
/** Relaxed non-SC atomic integral scalar boolean. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */
typedef ordered_atomic<bool, std::memory_order::memory_order_relaxed> relaxed_atomic_bool;
+ /** SC atomic integral scalar int8_t. Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write) */
+ typedef ordered_atomic<int8_t, std::memory_order::memory_order_seq_cst> sc_atomic_int8;
+
+ /** Relaxed non-SC atomic integral scalar int8_t. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */
+ typedef ordered_atomic<int8_t, std::memory_order::memory_order_relaxed> relaxed_atomic_int8;
+
/** SC atomic integral scalar uint8_t. Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write) */
typedef ordered_atomic<uint8_t, std::memory_order::memory_order_seq_cst> sc_atomic_uint8;
/** Relaxed non-SC atomic integral scalar uint8_t. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */
typedef ordered_atomic<uint8_t, std::memory_order::memory_order_relaxed> relaxed_atomic_uint8;
+ /** SC atomic integral scalar int16_t. Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write) */
+ typedef ordered_atomic<int16_t, std::memory_order::memory_order_seq_cst> sc_atomic_int16;
+
+ /** Relaxed non-SC atomic integral scalar int16_t. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */
+ typedef ordered_atomic<int16_t, std::memory_order::memory_order_relaxed> relaxed_atomic_int16;
+
/** SC atomic integral scalar uint16_t. Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write) */
typedef ordered_atomic<uint16_t, std::memory_order::memory_order_seq_cst> sc_atomic_uint16;
@@ -233,6 +245,18 @@ template <typename _Tp, std::memory_order _MO> struct ordered_atomic : private s
/** Relaxed non-SC atomic integral scalar integer. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */
typedef ordered_atomic<int, std::memory_order::memory_order_relaxed> relaxed_atomic_int;
+ /** SC atomic integral scalar int32_t. Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write) */
+ typedef ordered_atomic<int32_t, std::memory_order::memory_order_seq_cst> sc_atomic_int32;
+
+ /** Relaxed non-SC atomic integral scalar int32_t. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */
+ typedef ordered_atomic<int32_t, std::memory_order::memory_order_relaxed> relaxed_atomic_int32;
+
+ /** SC atomic integral scalar uint32_t. Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write) */
+ typedef ordered_atomic<uint32_t, std::memory_order::memory_order_seq_cst> sc_atomic_uint32;
+
+ /** Relaxed non-SC atomic integral scalar uint32_t. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */
+ typedef ordered_atomic<uint32_t, std::memory_order::memory_order_relaxed> relaxed_atomic_uint32;
+
/** SC atomic integral scalar jau::nsize_t. Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write) */
typedef ordered_atomic<jau::nsize_t, std::memory_order::memory_order_seq_cst> sc_atomic_nsize_t;
@@ -257,6 +281,18 @@ template <typename _Tp, std::memory_order _MO> struct ordered_atomic : private s
/** Relaxed non-SC atomic integral scalar ssize_t. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */
typedef ordered_atomic<ssize_t, std::memory_order::memory_order_relaxed> relaxed_atomic_ssize_t;
+ /** SC atomic integral scalar int64_t. Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write) */
+ typedef ordered_atomic<int64_t, std::memory_order::memory_order_seq_cst> sc_atomic_int64;
+
+ /** Relaxed non-SC atomic integral scalar int64_t. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */
+ typedef ordered_atomic<int64_t, std::memory_order::memory_order_relaxed> relaxed_atomic_int64;
+
+ /** SC atomic integral scalar uint64_t. Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write) */
+ typedef ordered_atomic<uint64_t, std::memory_order::memory_order_seq_cst> sc_atomic_uint64;
+
+ /** Relaxed non-SC atomic integral scalar uint64_t. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */
+ typedef ordered_atomic<uint64_t, std::memory_order::memory_order_relaxed> relaxed_atomic_uint64;
+
/**
* This class provides a RAII-style Sequentially Consistent (SC) data race free (DRF) critical block.
* <p>