void-packages/srcpkgs/musl/patches/fix-pi-mutex-cond-3.patch
q66 53d00fffc2 musl: backport patches to fix pthread_cond_wait with PI mutex
https://github.com/pulseaudio/pulseaudio/blob/master/src/pulsecore/mutex-posix.c#L55
https://github.com/pulseaudio/pulseaudio/blob/master/src/pulse/thread-mainloop.c#L118

413a8f8917

pulseaudio uses a prio-inheriting mutex since the above revision
that is paised with a condition variable; the behavior of this
was broken in musl until the above patches, which would result
in pulseaudio deadlocking with gstreamer pulsesink (most often
with webkit) and possibly other things.

Fixes https://github.com/void-linux/void-packages/issues/15631
2021-08-02 22:09:57 +02:00

28 lines
943 B
Diff

From d91a6cf6e369a79587c5665fce9635e5634ca201 Mon Sep 17 00:00:00 2001
From: Rich Felker <dalias@aerifal.cx>
Date: Fri, 30 Oct 2020 16:50:08 -0400
Subject: fix erroneous pthread_cond_wait mutex waiter count logic due to typo
introduced in commit 27b2fc9d6db956359727a66c262f1e69995660aa.
---
src/thread/pthread_cond_timedwait.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/thread/pthread_cond_timedwait.c')
diff --git a/src/thread/pthread_cond_timedwait.c b/src/thread/pthread_cond_timedwait.c
index a0cd4904..6b761455 100644
--- a/src/thread/pthread_cond_timedwait.c
+++ b/src/thread/pthread_cond_timedwait.c
@@ -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);
}
--
cgit v1.2.1