From 843860feae4d81442a345e97ec933f5c68436d94 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 18 Aug 2023 16:37:46 -0400 Subject: [PATCH] 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 --- include/urcu/uatomic.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 -- 2.39.5