X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_mutex_lock.c;h=2b4f3a7330cd045112755c234ee5e8516ad7d1a7;hb=357876052b125dcd74882f61afec19d8f519074c;hp=15ede3f5abdbe75edac86fdfd6ae8da7688bf472;hpb=e882756311c7b06e59fcc8e582f03852b7dcfd30;p=musl diff --git a/src/thread/pthread_mutex_lock.c b/src/thread/pthread_mutex_lock.c index 15ede3f5..2b4f3a73 100644 --- a/src/thread/pthread_mutex_lock.c +++ b/src/thread/pthread_mutex_lock.c @@ -2,8 +2,5 @@ int pthread_mutex_lock(pthread_mutex_t *m) { - int r; - while ((r=pthread_mutex_trylock(m)) == EBUSY) - __wait(&m->_m_lock, &m->_m_waiters, 1, 0); - return r; + return pthread_mutex_timedlock(m, 0); }