X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_mutex_lock.c;h=2b4f3a7330cd045112755c234ee5e8516ad7d1a7;hb=730bee725a770b543181424b52203dd1634ab5d1;hp=6696f17a234b7e571ed8ae5210fc273c2b0ad8db;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/thread/pthread_mutex_lock.c b/src/thread/pthread_mutex_lock.c index 6696f17a..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->__lock, &m->__waiters, 1, 0); - return r; + return pthread_mutex_timedlock(m, 0); }