X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fthread%2Fpthread_mutex_consistent.c;h=baea0ff44ff9efd108355fb15b56dac45a79e806;hb=b092f1c5fa9c048e12d002c7b972df5ecbe96d1d;hp=7dfb904f99a2da7ef67c3b611971dc609148927e;hpb=047e434ef5fd5437a74f98f63c40a77a683f7f3f;p=musl diff --git a/src/thread/pthread_mutex_consistent.c b/src/thread/pthread_mutex_consistent.c index 7dfb904f..baea0ff4 100644 --- a/src/thread/pthread_mutex_consistent.c +++ b/src/thread/pthread_mutex_consistent.c @@ -2,8 +2,8 @@ int pthread_mutex_consistent(pthread_mutex_t *m) { - if (m->_m_type < 8) return EINVAL; - if ((m->_m_lock & 0x3fffffff) != pthread_self()->tid) + if ((m->_m_type & 15) < 8) return EINVAL; + if ((m->_m_lock & 0x3fffffff) != __pthread_self()->tid) return EPERM; m->_m_type -= 8; return 0;