fix: handle EINTR correctly in get_cpu_mask_from_sysfs
[urcu.git] / include / urcu / uatomic.h
index 5365f1fb0fdac0159edb06835f639b3045cc79eb..561c8294f3faf1d8afeedb12ea97bbbde9eacdad 100644 (file)
@@ -5,9 +5,8 @@
 #ifndef _URCU_UATOMIC_H
 #define _URCU_UATOMIC_H
 
-#include <assert.h>
-
 #include <urcu/arch.h>
+#include <urcu/compiler.h>
 #include <urcu/config.h>
 
 enum cmm_memorder {
@@ -25,14 +24,12 @@ enum cmm_memorder {
 /*
  * Make sure that CMM_SEQ_CST_FENCE is not equivalent to other memory orders.
  */
-# ifdef static_assert
-static_assert(CMM_RELAXED == __ATOMIC_RELAXED, "");
-static_assert(CMM_CONSUME == __ATOMIC_CONSUME, "");
-static_assert(CMM_ACQUIRE == __ATOMIC_ACQUIRE, "");
-static_assert(CMM_RELEASE == __ATOMIC_RELEASE, "");
-static_assert(CMM_ACQ_REL == __ATOMIC_ACQ_REL, "");
-static_assert(CMM_SEQ_CST == __ATOMIC_SEQ_CST, "");
-# endif
+urcu_static_assert(CMM_RELAXED == __ATOMIC_RELAXED, "CMM_RELAXED vs __ATOMIC_RELAXED values mismatch", cmm_relaxed_values_mismatch);
+urcu_static_assert(CMM_CONSUME == __ATOMIC_CONSUME, "CMM_CONSUME vs __ATOMIC_CONSUME values mismatch", cmm_consume_values_mismatch);
+urcu_static_assert(CMM_ACQUIRE == __ATOMIC_ACQUIRE, "CMM_ACQUIRE vs __ATOMIC_ACQUIRE values mismatch", cmm_acquire_values_mismatch);
+urcu_static_assert(CMM_RELEASE == __ATOMIC_RELEASE, "CMM_RELEASE vs __ATOMIC_RELEASE values mismatch", cmm_release_values_mismatch);
+urcu_static_assert(CMM_ACQ_REL == __ATOMIC_ACQ_REL, "CMM_ACQ_REL vs __ATOMIC_ACQ_REL values mismatch", cmm_acq_rel_values_mismatch);
+urcu_static_assert(CMM_SEQ_CST == __ATOMIC_SEQ_CST, "CMM_SEQ_CST vs __ATOMIC_SEQ_CST values mismatch", cmm_seq_cst_values_mismatch);
 
 /*
  * This is not part of the public API. It it used internally to implement the
@@ -96,6 +93,8 @@ static inline int cmm_to_c11(int mo)
 #include <urcu/uatomic/m68k.h>
 #elif defined(URCU_ARCH_RISCV)
 #include <urcu/uatomic/riscv.h>
+#elif defined(URCU_ARCH_LOONGARCH)
+#include <urcu/uatomic/loongarch.h>
 #else
 #error "Cannot build: unrecognized architecture, see <urcu/arch.h>."
 #endif
This page took 0.023341 seconds and 4 git commands to generate.