about summary refs log tree commit diff
path: root/src/thread/pthread_mutex_consistent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/pthread_mutex_consistent.c')
-rw-r--r--src/thread/pthread_mutex_consistent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/thread/pthread_mutex_consistent.c b/src/thread/pthread_mutex_consistent.c
index baea0ff4..0db976ab 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 & 15) < 8) return EINVAL;
-	if ((m->_m_lock & 0x3fffffff) != __pthread_self()->tid)
+	if (!(m->_m_type & 8)) return EINVAL;
+	if ((m->_m_lock & 0x7fffffff) != __pthread_self()->tid)
 		return EPERM;
 	m->_m_type -= 8;
 	return 0;