[PATCH 08/22] x86: Remove ununsed atomic macros
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Sep 11 13:49:34 GMT 2025
These are already provided by the generic include/atomic.h.
---
sysdeps/x86/atomic-machine.h | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h
index d055364ddd..1a963fea2f 100644
--- a/sysdeps/x86/atomic-machine.h
+++ b/sysdeps/x86/atomic-machine.h
@@ -19,8 +19,6 @@
#ifndef _X86_ATOMIC_MACHINE_H
#define _X86_ATOMIC_MACHINE_H 1
-#define USE_ATOMIC_COMPILER_BUILTINS 1
-
#ifdef __x86_64__
# define __HAVE_64B_ATOMICS 1
#else
@@ -33,29 +31,6 @@
#define ATOMIC_EXCHANGE_USES_CAS 0
-#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
- ({ \
- typeof (*mem) __oldval = (oldval); \
- __atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
- __ATOMIC_ACQUIRE, __ATOMIC_RELAXED); \
- __oldval; \
- })
-
-#define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
- ({ \
- typeof (*mem) __oldval = (oldval); \
- !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
- __ATOMIC_ACQUIRE, __ATOMIC_RELAXED); \
- })
-
-#define atomic_exchange_acq(mem, newvalue) \
- __atomic_exchange_n (mem, newvalue, __ATOMIC_ACQUIRE)
-
-/* ??? Remove when catomic_exchange_and_add
- fallback uses __atomic_fetch_add. */
-#define catomic_exchange_and_add(mem, value) \
- __atomic_fetch_add (mem, value, __ATOMIC_ACQUIRE)
-
#define atomic_full_barrier() __sync_synchronize ()
#define atomic_read_barrier() __asm ("" ::: "memory")
#define atomic_write_barrier() __asm ("" ::: "memory")
--
2.43.0
More information about the Libc-alpha
mailing list