Arun Raghavan pushed to branch master at PulseAudio / pulseaudio
Commits: 757eb264 by Tanu Kaskinen at 2020-11-23T21:25:23+00:00 mutex-posix: Log pthread_mutex_unlock() error This call has been seen failing on FreeBSD, and it's difficult to debug without seeing which error the function returned. Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/988 - - - - - 1 changed file: - src/pulsecore/mutex-posix.c Changes: ===================================== src/pulsecore/mutex-posix.c ===================================== @@ -25,6 +25,8 @@ #include <errno.h> #include <pulse/xmalloc.h> + +#include <pulsecore/core-error.h> #include <pulsecore/macro.h> #include "mutex.h" @@ -103,9 +105,14 @@ bool pa_mutex_try_lock(pa_mutex *m) { } void pa_mutex_unlock(pa_mutex *m) { + int err; + pa_assert(m); - pa_assert_se(pthread_mutex_unlock(&m->mutex) == 0); + if ((err = pthread_mutex_unlock(&m->mutex) != 0)) { + pa_log("pthread_mutex_unlock() failed: %s", pa_cstrerror(err)); + pa_assert_not_reached(); + } } pa_cond *pa_cond_new(void) { View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/757eb264485b11ca9163a260d8772c59ac3108a1 -- View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/757eb264485b11ca9163a260d8772c59ac3108a1 You're receiving this email because of your account on gitlab.freedesktop.org.
_______________________________________________ pulseaudio-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits
