urcu/uatomic.h: Improve verbosity of static assert error messages
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 18 Aug 2023 20:37:46 +0000 (16:37 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 18 Aug 2023 20:38:59 +0000 (16:38 -0400)
Improve verbosity of static assert error messages for value mismatch.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I658a0ff556e362b42c437483a2e3ddb3eebf2b0a

include/urcu/uatomic.h

index aca9a63da3af2d5301b92daa47fa5cdbfcedfa4b..eeced1ec5661d689aa3cb3edae0b994ccfde008b 100644 (file)
@@ -24,12 +24,12 @@ enum cmm_memorder {
 /*
  * Make sure that CMM_SEQ_CST_FENCE is not equivalent to other memory orders.
  */
-urcu_static_assert(CMM_RELAXED == __ATOMIC_RELAXED, "", cmm_relaxed);
-urcu_static_assert(CMM_CONSUME == __ATOMIC_CONSUME, "", cmm_consume);
-urcu_static_assert(CMM_ACQUIRE == __ATOMIC_ACQUIRE, "", cmm_acquire);
-urcu_static_assert(CMM_RELEASE == __ATOMIC_RELEASE, "", cmm_release);
-urcu_static_assert(CMM_ACQ_REL == __ATOMIC_ACQ_REL, "", cmm_acq_rel);
-urcu_static_assert(CMM_SEQ_CST == __ATOMIC_SEQ_CST, "", cmm_seq_cst);
+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
This page took 0.025848 seconds and 4 git commands to generate.