mirror of git://git.musl-libc.org/musl
revert mutex "optimization" that turned out to be worse
This commit is contained in:
parent
80c4dcd253
commit
8524d6536c
|
@ -7,7 +7,7 @@ int pthread_mutex_trylock(pthread_mutex_t *m)
|
|||
pthread_t self;
|
||||
|
||||
if (m->_m_type == PTHREAD_MUTEX_NORMAL)
|
||||
return (m->_m_lock || a_swap(&m->_m_lock, 1)) ? EBUSY : 0;
|
||||
return -a_swap(&m->_m_lock, 1) & EBUSY;
|
||||
|
||||
self = pthread_self();
|
||||
tid = self->tid | 0x80000000;
|
||||
|
|
Loading…
Reference in New Issue