]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Make CRYPTO_atomic_load/store use the same preprocessor guards
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 19 Feb 2025 13:40:44 +0000 (14:40 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 21 Feb 2025 13:52:37 +0000 (14:52 +0100)
as the other CRYPTO_atomic_X functions.
All CRYPTO_atomic functions should use the same logic here,
just in case...

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26815)

(cherry picked from commit 3240427a8530f5aa6070f135e954e20e591fa132)

crypto/threads_pthread.c

index 801855c9306e2095129970c556679a1b474934c2..f177fff4245198330fdfa6102723e9639c7a3a28 100644 (file)
@@ -250,7 +250,7 @@ int CRYPTO_atomic_or(uint64_t *val, uint64_t op, uint64_t *ret,
 
 int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock)
 {
-# if defined(__GNUC__) && defined(__ATOMIC_ACQUIRE) && !defined(BROKEN_CLANG_ATOMICS)
+# if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
     if (__atomic_is_lock_free(sizeof(*val), val)) {
         __atomic_load(val, ret, __ATOMIC_ACQUIRE);
         return 1;