summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMitya Selivanov <0x7fffff@guattari.ru>2022-08-31 03:12:46 +0400
committerMitya Selivanov <0x7fffff@guattari.ru>2022-08-31 03:12:46 +0400
commit5a5b22c9ba9d1644c1ac371a7021433144cce33d (patch)
treef70e79ef37f3cbcabeb27d10a86ddcc1b363e612 /source
parentd2b9489594cde6024626c960697a2051e23169bb (diff)
downloadkit-5a5b22c9ba9d1644c1ac371a7021433144cce33d.zip
test
Diffstat (limited to 'source')
-rw-r--r--source/kit/atomic.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/source/kit/atomic.h b/source/kit/atomic.h
index 6ab6bee..8e3ceb8 100644
--- a/source/kit/atomic.h
+++ b/source/kit/atomic.h
@@ -105,16 +105,15 @@ uint64_t kit_atomic_fetch_add_explicit_64(uint64_t volatile *var,
sizeof *(var_) == 4 || sizeof *(var_) == 8), \
(sizeof *(var_) == 1 \
? kit_atomic_load_explicit_8((uint8_t volatile *) (var_), \
- (value_), (memory_order_)) \
- : sizeof *(var_) == 2 ? kit_atomic_load_explicit_16( \
- (uint16_t volatile *) (var_), \
- (value_), (memory_order_)) \
- : sizeof *(var_) == 4 ? kit_atomic_load_explicit_32( \
- (uint32_t volatile *) (var_), \
- (value_), (memory_order_)) \
- : kit_atomic_load_explicit_64( \
- (uint64_t volatile *) (var_), \
- (value_), (memory_order_))))
+ (memory_order_)) \
+ : sizeof *(var_) == 2 \
+ ? kit_atomic_load_explicit_16( \
+ (uint16_t volatile *) (var_), (memory_order_)) \
+ : sizeof *(var_) == 4 \
+ ? kit_atomic_load_explicit_32( \
+ (uint32_t volatile *) (var_), (memory_order_)) \
+ : kit_atomic_load_explicit_64( \
+ (uint64_t volatile *) (var_), (memory_order_))))
# define atomic_exchange_explicit(var_, value_, memory_order_) \
(assert(sizeof *(var_) == 1 || sizeof *(var_) == 2 || \