about summary refs log tree commit diff
path: root/sysdeps/tile/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/tile/nptl')
-rw-r--r--sysdeps/tile/nptl/pthread_spin_lock.c10
-rw-r--r--sysdeps/tile/nptl/pthread_spin_trylock.c4
-rw-r--r--sysdeps/tile/nptl/pthread_spin_unlock.c5
-rw-r--r--sysdeps/tile/nptl/tls.h7
4 files changed, 3 insertions, 23 deletions
diff --git a/sysdeps/tile/nptl/pthread_spin_lock.c b/sysdeps/tile/nptl/pthread_spin_lock.c
index 16ef021de0..21c5ed4c0e 100644
--- a/sysdeps/tile/nptl/pthread_spin_lock.c
+++ b/sysdeps/tile/nptl/pthread_spin_lock.c
@@ -26,16 +26,10 @@
 /* Initial cycle delay for exponential backoff */
 #define BACKOFF_START 32
 
-#ifdef __tilegx__
 /* Use cmpexch() after the initial fast-path exch to avoid
    invalidating the cache line of the lock holder.  */
-# define TNS(p) atomic_exchange_acq((p), 1)
-# define CMPTNS(p) atomic_compare_and_exchange_val_acq((p), 1, 0)
-#else
-# define TNS(p) __insn_tns(p)
-# define CMPTNS(p) __insn_tns(p)
-# define SPR_CYCLE SPR_CYCLE_LOW   /* The low 32 bits are sufficient. */
-#endif
+#define TNS(p) atomic_exchange_acq((p), 1)
+#define CMPTNS(p) atomic_compare_and_exchange_val_acq((p), 1, 0)
 
 int
 pthread_spin_lock (pthread_spinlock_t *lock)
diff --git a/sysdeps/tile/nptl/pthread_spin_trylock.c b/sysdeps/tile/nptl/pthread_spin_trylock.c
index c2d6766fd1..6974a09983 100644
--- a/sysdeps/tile/nptl/pthread_spin_trylock.c
+++ b/sysdeps/tile/nptl/pthread_spin_trylock.c
@@ -19,11 +19,7 @@
 #include "pthreadP.h"
 #include <errno.h>
 
-#ifdef __tilegx__
 #define TNS(p) __insn_exch4((p), 1)
-#else
-#define TNS(p) __insn_tns(p)
-#endif
 
 int
 pthread_spin_trylock (pthread_spinlock_t *lock)
diff --git a/sysdeps/tile/nptl/pthread_spin_unlock.c b/sysdeps/tile/nptl/pthread_spin_unlock.c
index 63bc814985..be23478e39 100644
--- a/sysdeps/tile/nptl/pthread_spin_unlock.c
+++ b/sysdeps/tile/nptl/pthread_spin_unlock.c
@@ -22,12 +22,7 @@
 int
 pthread_spin_unlock (pthread_spinlock_t *lock)
 {
-#ifdef __tilegx__
   /* Use exchange() to bypass the write buffer. */
   atomic_exchange_rel (lock, 0);
-#else
-  atomic_full_barrier ();
-  *lock = 0;
-#endif
   return 0;
 }
diff --git a/sysdeps/tile/nptl/tls.h b/sysdeps/tile/nptl/tls.h
index 7314843cfb..5ddae18d15 100644
--- a/sysdeps/tile/nptl/tls.h
+++ b/sysdeps/tile/nptl/tls.h
@@ -113,13 +113,8 @@ register void *__thread_pointer asm ("tp");
 			 - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
 
 /* Magic for libthread_db to know how to do THREAD_SELF.  */
-#ifdef __tilegx__
 # define DB_THREAD_SELF \
-  REGISTER (64, 64, REG_TP * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
-#else
-# define DB_THREAD_SELF \
-  REGISTER (32, 32, REG_TP * 4, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
-#endif
+ REGISTER (64, 64, REG_TP * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
 
 /* Read member of the thread descriptor directly.  */
 # define THREAD_GETMEM(descr, member) (descr->member)