revert mutex "optimization" that turned out to be worse
This commit is contained in:
parent
80c4dcd253
commit
8524d6536c
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ int pthread_mutex_trylock(pthread_mutex_t *m)
|
||||||
pthread_t self;
|
pthread_t self;
|
||||||
|
|
||||||
if (m->_m_type == PTHREAD_MUTEX_NORMAL)
|
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();
|
self = pthread_self();
|
||||||
tid = self->tid | 0x80000000;
|
tid = self->tid | 0x80000000;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue