aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-11-15 07:48:16 +0100
committerSven Gothel <[email protected]>2020-11-15 07:48:16 +0100
commitab78639c0dc59a087088e8581f2363e7f74daf5b (patch)
tree0e22bcef6545bcc6eeadc5be475ce17f6e0f5025
parent1371255266daf92cb29dabb16b86a559e1786db6 (diff)
ordered_atomic.hpp: Add predef ordered_atomic typedef's for uint8 and uint16
-rw-r--r--include/jau/ordered_atomic.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/jau/ordered_atomic.hpp b/include/jau/ordered_atomic.hpp
index 62b03ca..cfb251d 100644
--- a/include/jau/ordered_atomic.hpp
+++ b/include/jau/ordered_atomic.hpp
@@ -215,6 +215,18 @@ 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 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 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;
+
+ /** Relaxed non-SC atomic integral scalar uint16_t. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */
+ typedef ordered_atomic<uint16_t, std::memory_order::memory_order_relaxed> relaxed_atomic_uint16;
+
/** SC atomic integral scalar integer. Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write) */
typedef ordered_atomic<int, std::memory_order::memory_order_seq_cst> sc_atomic_int;