From 06593e0c1af243bc600ba69993b24791443928b5 Mon Sep 17 00:00:00 2001 From: deischen Date: Tue, 4 Nov 2003 19:56:12 +0000 Subject: Libpthread uses the convention that all of its (non-weak) symbols begin with underscores and provide weak definitions without underscores. Make the pthread spinlock conform to this convention. --- lib/libpthread/thread/thr_pspinlock.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'lib/libpthread') diff --git a/lib/libpthread/thread/thr_pspinlock.c b/lib/libpthread/thread/thr_pspinlock.c index de26750..b58d712 100644 --- a/lib/libpthread/thread/thr_pspinlock.c +++ b/lib/libpthread/thread/thr_pspinlock.c @@ -34,8 +34,14 @@ #define SPIN_COUNT 10000 +__weak_reference(_pthread_spin_init, pthread_spin_init); +__weak_reference(_pthread_spin_destroy, pthread_spin_destroy); +__weak_reference(_pthread_spin_trylock, pthread_spin_trylock); +__weak_reference(_pthread_spin_lock, pthread_spin_lock); +__weak_reference(_pthread_spin_unlock, pthread_spin_unlock); + int -pthread_spin_init(pthread_spinlock_t *lock, int pshared) +_pthread_spin_init(pthread_spinlock_t *lock, int pshared) { struct pthread_spinlock *lck; int ret; @@ -55,7 +61,7 @@ pthread_spin_init(pthread_spinlock_t *lock, int pshared) } int -pthread_spin_destroy(pthread_spinlock_t *lock) +_pthread_spin_destroy(pthread_spinlock_t *lock) { int ret; @@ -73,7 +79,7 @@ pthread_spin_destroy(pthread_spinlock_t *lock) } int -pthread_spin_trylock(pthread_spinlock_t *lock) +_pthread_spin_trylock(pthread_spinlock_t *lock) { struct pthread_spinlock *lck; struct pthread *self = _pthread_self(); @@ -98,7 +104,7 @@ pthread_spin_trylock(pthread_spinlock_t *lock) } int -pthread_spin_lock(pthread_spinlock_t *lock) +_pthread_spin_lock(pthread_spinlock_t *lock) { struct pthread_spinlock *lck; struct pthread *self = _pthread_self(); @@ -132,7 +138,7 @@ pthread_spin_lock(pthread_spinlock_t *lock) } int -pthread_spin_unlock(pthread_spinlock_t *lock) +_pthread_spin_unlock(pthread_spinlock_t *lock) { struct pthread_spinlock *lck; int ret; -- cgit v1.1