From d8e68aea9ded7aff09f9e47857e1c3701cbcc099 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 27 Jun 2024 01:43:25 -0400 Subject: [PATCH] atomic: Solaris needs the `_nv` variant of `atomic_or_uint`. (This means "new value" and returns the atomically updated value. Before, we were returning a value from a void function.) (cherry picked from commit 498cbffd89105efbcdb5b79fa1478cdf91fbc351) --- src/atomic/SDL_atomic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atomic/SDL_atomic.c b/src/atomic/SDL_atomic.c index e350c15b1e..ea26f17ae9 100644 --- a/src/atomic/SDL_atomic.c +++ b/src/atomic/SDL_atomic.c @@ -257,7 +257,7 @@ int SDL_AtomicGet(SDL_AtomicInt *a) #elif defined(SDL_PLATFORM_MACOS) /* this is deprecated in 10.12 sdk; favor gcc atomics. */ return sizeof(a->value) == sizeof(uint32_t) ? OSAtomicOr32Barrier(0, (volatile uint32_t *)&a->value) : OSAtomicAdd64Barrier(0, (volatile int64_t *)&a->value); #elif defined(SDL_PLATFORM_SOLARIS) - return atomic_or_uint((volatile uint_t *)&a->value, 0); + return atomic_or_uint_nv((volatile uint_t *)&a->value, 0); #else int value; do {