]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
x86: Remove UP macro. Define LOCK_PREFIX unconditionally.
authorFlorian Weimer <fweimer@redhat.com>
Fri, 13 Nov 2020 14:19:41 +0000 (15:19 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 13 Nov 2020 14:20:03 +0000 (15:20 +0100)
The UP macro is never defined.  Also define LOCK_PREFIX
unconditionally, to the same string.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/i386/nptl/tls.h
sysdeps/i386/pthread_spin_trylock.S
sysdeps/x86/atomic-machine.h
sysdeps/x86_64/nptl/pthread_spin_trylock.S
sysdeps/x86_64/nptl/tls.h

index ec03fc189cc2e80e74ba3786036ca200301dda32..5042d52b98a0be6cfd9d3e492894b2ff05b57828 100644 (file)
@@ -155,13 +155,7 @@ union user_desc_init
 # define INIT_SYSINFO
 #endif
 
-#ifndef LOCK_PREFIX
-# ifdef UP
-#  define LOCK_PREFIX  /* nothing */
-# else
-#  define LOCK_PREFIX "lock;"
-# endif
-#endif
+#define LOCK_PREFIX "lock;"
 
 static inline void __attribute__ ((unused, always_inline))
 tls_fill_user_desc (union user_desc_init *desc,
index 8edb6763814454d015ec557f75a227ad6a7d74f8..bdebc71f9aafa65bafeca15c4a11217edf461053 100644 (file)
 #include <errno.h>
 
 
-#ifdef UP
-# define LOCK
-#else
-# define LOCK lock
-#endif
-
 ENTRY (pthread_spin_trylock)
        movl    4(%esp), %edx
        movl    $1, %eax
        xorl    %ecx, %ecx
-       LOCK
+       lock
        cmpxchgl %ecx, (%edx)
        movl    $EBUSY, %eax
 #ifdef HAVE_CMOV
index bb496483743b8ef105c4f8872b973151dc05b61c..7b3c81ea0fb59aaa5fc3681cc710db1820e9e45c 100644 (file)
@@ -49,13 +49,7 @@ typedef intmax_t atomic_max_t;
 typedef uintmax_t uatomic_max_t;
 
 
-#ifndef LOCK_PREFIX
-# ifdef UP
-#  define LOCK_PREFIX  /* nothing */
-# else
-#  define LOCK_PREFIX "lock;"
-# endif
-#endif
+#define LOCK_PREFIX "lock;"
 
 #define USE_ATOMIC_COMPILER_BUILTINS   1
 
index c084577755af9b4aca4cc5cbf78caccb1f570741..84c9b4144897545dc72f278be4265bc1346219ee 100644 (file)
 #include <errno.h>
 
 
-#ifdef UP
-# define LOCK
-#else
-# define LOCK lock
-#endif
-
 ENTRY(pthread_spin_trylock)
        movl    $1, %eax
        xorl    %ecx, %ecx
-       LOCK
+       lock
        cmpxchgl %ecx, (%rdi)
        movl    $EBUSY, %eax
        cmovel  %ecx, %eax
index 7ba9c4e69b285fa357a9989026da2fb31cc7077d..fbd7f9cb89df0c1b3dca9503588504b4a4882783 100644 (file)
@@ -99,13 +99,7 @@ _Static_assert (offsetof (tcbhead_t, __glibc_unused2) == 0x80,
 /* Get system call information.  */
 # include <sysdep.h>
 
-#ifndef LOCK_PREFIX
-# ifdef UP
-#  define LOCK_PREFIX  /* nothing */
-# else
-#  define LOCK_PREFIX  "lock;"
-# endif
-#endif
+#define LOCK_PREFIX "lock;"
 
 /* This is the size of the initial TCB.  Can't be just sizeof (tcbhead_t),
    because NPTL getpid, __libc_alloca_cutoff etc. need (almost) the whole