summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2003-11-04 19:56:12 +0000
committerdeischen <deischen@FreeBSD.org>2003-11-04 19:56:12 +0000
commit06593e0c1af243bc600ba69993b24791443928b5 (patch)
treea40610805cd5440ab26bb39d590a3dded29bddbc /lib/libpthread
parent3ccfc8a9e49cbfef18f66d1e274467b8f7d53a89 (diff)
downloadFreeBSD-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')
-rw-r--r--lib/libpthread/thread/thr_pspinlock.c16
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;
OpenPOWER on IntegriCloud