summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-04-03 10:06:15 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-04-03 10:06:15 +0000
commitc6893de69de1189cf7230e18ebfe8ebafb5ff2f0 (patch)
tree614b4382ab0156218a66a7f9d56ff64e41d2508a
parentecc61d555f0f7b4ccf5b39290d8a89494a3733c6 (diff)
Remove #ifdef that doesn't make sense anymore; extend clang workaround to
conver __sync_val_compare_and_swap. ok jsg@
-rw-r--r--lib/mesa/src/util/u_atomic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mesa/src/util/u_atomic.c b/lib/mesa/src/util/u_atomic.c
index a7ff22c56..2684e8e3a 100644
--- a/lib/mesa/src/util/u_atomic.c
+++ b/lib/mesa/src/util/u_atomic.c
@@ -163,10 +163,13 @@ __sync_val_compare_and_swap_4(uint32_t *ptr, uint32_t oldval, uint32_t newval)
#pragma redefine_extname __sync_sub_and_fetch_8_c __sync_sub_and_fetch_8
#pragma redefine_extname __sync_fetch_and_add_8_c __sync_fetch_and_add_8
#pragma redefine_extname __sync_fetch_and_sub_8_c __sync_fetch_and_sub_8
+#pragma redefine_extname __sync_val_compare_and_swap_8_c \
+ __sync_val_compare_and_swap_8
#define __sync_add_and_fetch_8 __sync_add_and_fetch_8_c
#define __sync_sub_and_fetch_8 __sync_sub_and_fetch_8_c
#define __sync_fetch_and_add_8 __sync_fetch_and_add_8_c
#define __sync_fetch_and_sub_8 __sync_fetch_and_sub_8_c
+#define __sync_val_compare_and_swap_8 __sync_val_compare_and_swap_8_c
#endif
WEAK uint64_t
@@ -221,7 +224,6 @@ __sync_fetch_and_sub_8(uint64_t *ptr, uint64_t val)
return r;
}
-#ifdef USE_GCC_ATOMIC_BUILTINS
WEAK uint64_t
__sync_val_compare_and_swap_8(uint64_t *ptr, uint64_t oldval, uint64_t newval)
{
@@ -235,6 +237,5 @@ __sync_val_compare_and_swap_8(uint64_t *ptr, uint64_t oldval, uint64_t newval)
return r;
}
-#endif /* USE_GCC_ATOMIC_BUILTINS */
#endif