revert mutex "optimization" that turned out to be worse

This commit is contained in:
Rich Felker 2011-03-29 15:11:25 -04:00
parent 80c4dcd253
commit 8524d6536c
1 changed files with 1 additions and 1 deletions

View File

@ -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;