notify: protect notify->pending with the mutex
There was a known deadlocking bug in the notify library: when the other thread set notify->pending after the according check in notify_wait(), the latter thread was deadlocked. Resolve this by synchronizing all accesses to notify->pending with the notify object's mutex. Since notify_signal_sync() was never used, we can remove it. As a consequence, we don't need notify_enter() and notify_leave() anymore; eliminate them, too.
This commit is contained in:
@@ -384,8 +384,6 @@ static void do_play(void)
|
||||
|
||||
static void * player_task(mpd_unused void *arg)
|
||||
{
|
||||
notify_enter(&pc.notify);
|
||||
|
||||
while (1) {
|
||||
switch (pc.command) {
|
||||
case PLAYER_COMMAND_PLAY:
|
||||
|
Reference in New Issue
Block a user