X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_rwlock_timedrdlock.c;h=8cdd8ecf1775c4a180023ceac61069d76b741e61;hb=4554f155dd23a65fcdfd39f1d5af8af55ba37694;hp=0d5d0d6c05fe8fe5c93999d45dbd76b47ee860b1;hpb=0fc317d83c1167393bf276a8bfbdd9a4e02e8258;p=musl diff --git a/src/thread/pthread_rwlock_timedrdlock.c b/src/thread/pthread_rwlock_timedrdlock.c index 0d5d0d6c..8cdd8ecf 100644 --- a/src/thread/pthread_rwlock_timedrdlock.c +++ b/src/thread/pthread_rwlock_timedrdlock.c @@ -1,6 +1,6 @@ #include "pthread_impl.h" -int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict rw, const struct timespec *restrict at) +int __pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict rw, const struct timespec *restrict at) { int r, t; @@ -10,7 +10,7 @@ int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict rw, const struct times int spins = 100; while (spins-- && rw->_rw_lock && !rw->_rw_waiters) a_spin(); - while ((r=pthread_rwlock_tryrdlock(rw))==EBUSY) { + while ((r=__pthread_rwlock_tryrdlock(rw))==EBUSY) { if (!(r=rw->_rw_lock) || (r&0x7fffffff)!=0x7fffffff) continue; t = r | 0x80000000; a_inc(&rw->_rw_waiters); @@ -21,3 +21,5 @@ int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict rw, const struct times } return r; } + +weak_alias(__pthread_rwlock_timedrdlock, pthread_rwlock_timedrdlock);