From: Mathieu Desnoyers Date: Fri, 18 Aug 2023 20:37:46 +0000 (-0400) Subject: urcu/uatomic.h: Improve verbosity of static assert error messages X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=843860feae4d81442a345e97ec933f5c68436d94;p=userspace-rcu.git urcu/uatomic.h: Improve verbosity of static assert error messages Improve verbosity of static assert error messages for value mismatch. Signed-off-by: Mathieu Desnoyers Change-Id: I658a0ff556e362b42c437483a2e3ddb3eebf2b0a --- diff --git a/include/urcu/uatomic.h b/include/urcu/uatomic.h index aca9a63..eeced1e 100644 --- a/include/urcu/uatomic.h +++ b/include/urcu/uatomic.h @@ -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