提交 b2b95a58 编写于 作者: R Rich Felker

add fast path for normal mutexes back to pthread_mutex_lock

上级 188ebf51
......@@ -2,5 +2,8 @@
int pthread_mutex_lock(pthread_mutex_t *m)
{
if (m->_m_type == PTHREAD_MUTEX_NORMAL && !a_cas(&m->_m_lock, 0, EBUSY))
return 0;
return pthread_mutex_timedlock(m, 0);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册