From 70a5b9c197c6ff8db6a34ed4d7a98e008ec4eab2 Mon Sep 17 00:00:00 2001 From: doodspav Date: Mon, 6 May 2024 22:20:22 +0300 Subject: [PATCH] GHI #32 Clarify cmpxchg weak vs strong --- include/patomic/types/ops/implicit.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/patomic/types/ops/implicit.h b/include/patomic/types/ops/implicit.h index acf634988..d8eb025e0 100644 --- a/include/patomic/types/ops/implicit.h +++ b/include/patomic/types/ops/implicit.h @@ -441,12 +441,12 @@ typedef struct { patomic_opsig_exchange_t fp_exchange; /** @brief Atomic compare-exchange with implicit memory order. Operation may - * spuriously fail even if object's value matches expected value. */ + * spuriously fail and act as if the object's value does not compare + * equal to the expected value. */ patomic_opsig_cmpxchg_t fp_cmpxchg_weak; /** @brief Atomic compare-exchange with implicit memory order. Operation - * will never spuriously fail if object's value matches expected - * value. */ + * will never spuriously fail. */ patomic_opsig_cmpxchg_t fp_cmpxchg_strong; } patomic_ops_xchg_t;