|
5 | 5 | * Copyright (c) 2018 Research Organization for Information Science
|
6 | 6 | * and Technology (RIST). All rights reserved.
|
7 | 7 | * Copyright (c) 2019 Google, LLC. All rights reserved.
|
| 8 | + * Copyright (c) 2019 Triad National Security, LLC. All rights |
| 9 | + * reserved. |
8 | 10 | * $COPYRIGHT$
|
9 | 11 | *
|
10 | 12 | * Additional copyrights may follow
|
@@ -99,9 +101,9 @@ static inline void opal_atomic_rmb (void)
|
99 | 101 | #define opal_atomic_compare_exchange_strong_acq(addr, oldval, newval) atomic_compare_exchange_strong_explicit (addr, oldval, newval, memory_order_acquire, memory_order_relaxed)
|
100 | 102 | #define opal_atomic_compare_exchange_strong_rel(addr, oldval, newval) atomic_compare_exchange_strong_explicit (addr, oldval, newval, memory_order_release, memory_order_relaxed)
|
101 | 103 |
|
102 |
| -#define opal_atomic_swap_32(addr, value) atomic_exchange_explicit (addr, value, memory_order_relaxed) |
103 |
| -#define opal_atomic_swap_64(addr, value) atomic_exchange_explicit (addr, value, memory_order_relaxed) |
104 |
| -#define opal_atomic_swap_ptr(addr, value) atomic_exchange_explicit (addr, value, memory_order_relaxed) |
| 104 | +#define opal_atomic_swap_32(addr, value) atomic_exchange_explicit ((_Atomic unsigned int *)addr, value, memory_order_relaxed) |
| 105 | +#define opal_atomic_swap_64(addr, value) atomic_exchange_explicit ((_Atomic unsigned long *)addr, value, memory_order_relaxed) |
| 106 | +#define opal_atomic_swap_ptr(addr, value) atomic_exchange_explicit ((_Atomic unsigned long *)addr, value, memory_order_relaxed) |
105 | 107 |
|
106 | 108 | #define OPAL_ATOMIC_STDC_DEFINE_FETCH_OP(op, bits, type, operator) \
|
107 | 109 | static inline type opal_atomic_fetch_ ## op ##_## bits (opal_atomic_ ## type *addr, type value) \
|
|
0 commit comments