From 8f03a364f803ad878ea3ab226fd2955ed4565495 Mon Sep 17 00:00:00 2001 From: Agustina Arzille Date: Tue, 18 Oct 2016 00:20:45 +0200 Subject: Make pthread_spinlock use gsync * pthread/pt-spin-inlines.c (pthread_spin_lock): Define weak alias for __pthread_spin_lock. * sysdeps/mach/bits/spin-lock-inline.h: Include instead of . (__pthread_spin_trylock, __pthread_spin_unlock): Use __spin_lock_t type instead of __lock. (__pthread_spin_lock): Define as inline only, use __spin_lock and __spin_lock_t type. * sysdeps/mach/bits/spin-lock.h: Do not include (__pthread_spinlock_t): Use volatile int instead of __spin_lock_t. (__PTHREAD_SPIN_LOCK_INITIALIZER): Define to 0. * sysdeps/mach/i386/bits/spin-lock-inline.h: Remove file. * sysdeps/mach/i386/bits/spin-lock.h: Remove file. * sysdeps/posix/pt-spin.c (pthread_spin_lock, __pthread_spin_lock): Remove weak aliases, provided by pt-spin-inlines.c --- pthread/pt-spin-inlines.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pthread') diff --git a/pthread/pt-spin-inlines.c b/pthread/pt-spin-inlines.c index cfb21dd..97afb4d 100644 --- a/pthread/pt-spin-inlines.c +++ b/pthread/pt-spin-inlines.c @@ -25,10 +25,9 @@ #include -/* Weak aliases for the spin lock functions. Note that - pthread_spin_lock is left out deliberately. We already provide an - implementation for it in pt-spin.c. */ +/* Weak aliases for the spin lock functions. */ weak_alias (__pthread_spin_destroy, pthread_spin_destroy); weak_alias (__pthread_spin_init, pthread_spin_init); weak_alias (__pthread_spin_trylock, pthread_spin_trylock); +weak_alias (__pthread_spin_lock, pthread_spin_lock); weak_alias (__pthread_spin_unlock, pthread_spin_unlock); -- cgit v1.2.3