X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_mutex_lock.c;h=99c15bd8f6f649c79f61c807341d049b878a3396;hb=2b0cedac8d03bbeb1bd0e1d77fab775b1d9f3e25;hp=87b19752ee0e4d2845a9e430ae2b60447c4533a4;hpb=124b4ebc8a293e616cc0a7eaba3587c9b7ff13ec;p=musl diff --git a/src/thread/pthread_mutex_lock.c b/src/thread/pthread_mutex_lock.c index 87b19752..99c15bd8 100644 --- a/src/thread/pthread_mutex_lock.c +++ b/src/thread/pthread_mutex_lock.c @@ -4,7 +4,7 @@ int pthread_mutex_lock(pthread_mutex_t *m) { int r; - if (m->_m_type == PTHREAD_MUTEX_NORMAL && !a_swap(&m->_m_lock, 1)) + if (m->_m_type == PTHREAD_MUTEX_NORMAL && !a_swap(&m->_m_lock, EBUSY)) return 0; while ((r=pthread_mutex_trylock(m)) == EBUSY) {