fix erroneous pthread_cond_wait mutex waiter count logic due to typo
authorRich Felker <dalias@aerifal.cx>
Fri, 30 Oct 2020 20:50:08 +0000 (16:50 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 30 Oct 2020 20:50:08 +0000 (16:50 -0400)
introduced in commit 27b2fc9d6db956359727a66c262f1e69995660aa.

src/thread/pthread_cond_timedwait.c

index a0cd490..6b76145 100644 (file)
@@ -155,7 +155,7 @@ relock:
                int val = m->_m_lock;
                if (val>0) a_cas(&m->_m_lock, val, val|0x80000000);
                unlock_requeue(&node.prev->barrier, &m->_m_lock, m->_m_type & (8|128));
-       } else if (!!(m->_m_type & 8)) {
+       } else if (!(m->_m_type & 8)) {
                a_dec(&m->_m_waiters);          
        }