Wrap thread_data in thread_segment
[fio.git] / arch / arch.h
index 08c3d7033d3037f854649b861cc81415469d7096..a25779d4fd8521fe56a38027c182e5c7fcd5a4d5 100644 (file)
@@ -36,6 +36,13 @@ extern unsigned long arch_flags;
 
 #define ARCH_CPU_CLOCK_WRAPS
 
+#define atomic_add(p, v)                                       \
+       atomic_fetch_add((_Atomic typeof(*(p)) *)(p), v)
+#define atomic_sub(p, v)                                       \
+       atomic_fetch_sub((_Atomic typeof(*(p)) *)(p), v)
+#define atomic_load_relaxed(p)                                 \
+       atomic_load_explicit((_Atomic typeof(*(p)) *)(p),       \
+                            memory_order_relaxed)
 #define atomic_load_acquire(p)                                 \
        atomic_load_explicit((_Atomic typeof(*(p)) *)(p),       \
                             memory_order_acquire)