Fix: missing `_mutex_lock()` before signaling a condition variable
According to the PTHREAD_COND(3) man page, a condition variable
signaling and broadcast should alway be protected with a mutex.
This commit fixes two calls to `pthread_cond_signal()` function without
holding the right lock.
This commit also adds an assertion right before two calls to
`pthread_cond_broadcast()` where it's less obvious from the surrounding
code that the mutex is held. This documents the code and may be useful
for future debugging.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Iebf5a8b2e4251bd1ff4cd462e548cd3486c6cb75
This page took 0.028683 seconds and 5 git commands to generate.