diff options
author | deischen <deischen@FreeBSD.org> | 2003-11-04 19:56:12 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2003-11-04 19:56:12 +0000 |
commit | 06593e0c1af243bc600ba69993b24791443928b5 (patch) | |
tree | a40610805cd5440ab26bb39d590a3dded29bddbc /lib/libpthread/thread/thr_pspinlock.c | |
parent | 3ccfc8a9e49cbfef18f66d1e274467b8f7d53a89 (diff) | |
download | FreeBSD-src-06593e0c1af243bc600ba69993b24791443928b5.zip FreeBSD-src-06593e0c1af243bc600ba69993b24791443928b5.tar.gz |
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.
Diffstat (limited to 'lib/libpthread/thread/thr_pspinlock.c')
-rw-r--r-- | lib/libpthread/thread/thr_pspinlock.c | 16 |
1 files changed, 11 insertions, 5 deletions
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; |