projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2876ae
)
mutex: handle gracefully if a PTHREAD_PRIO_INHERIT protocol cannot be set
author
Pino Toscano
<toscano.pino@tiscali.it>
Mon, 14 Nov 2011 10:58:25 +0000
(11:58 +0100)
committer
Arun Raghavan
<arun.raghavan@collabora.co.uk>
Mon, 2 Jan 2012 18:50:04 +0000
(
00:20
+0530)
This adds an additional check for unavailable PTHREAD_PRIO_INHERIT to the
fallback work done in
ca717643ee768307475fc36ea29d920a13db0a8e
See bug #42715
src/pulsecore/mutex-posix.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/mutex-posix.c
b/src/pulsecore/mutex-posix.c
index
634087d
..
d90525b
100644
(file)
--- a/
src/pulsecore/mutex-posix.c
+++ b/
src/pulsecore/mutex-posix.c
@@
-50,8
+50,10
@@
pa_mutex* pa_mutex_new(pa_bool_t recursive, pa_bool_t inherit_priority) {
pa_assert_se(pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) == 0);
#ifdef HAVE_PTHREAD_PRIO_INHERIT
- if (inherit_priority)
- pa_assert_se(pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT) == 0);
+ if (inherit_priority) {
+ r = pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
+ pa_assert(r == 0 || r == ENOTSUP);
+ }
#endif
m = pa_xnew(pa_mutex, 1);