aboutsummaryrefslogtreecommitdiffstats
path: root/src/player.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:14:45 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:14:45 +0000
commit4ee8396f417d15c161b425c6f8c15fe845242434 (patch)
treef284695c784364904aebe52d0129e3a98deb4384 /src/player.c
parentb7ac3fab465f883220790df8cad84d8bd96446bb (diff)
downloadmpd-4ee8396f417d15c161b425c6f8c15fe845242434.tar.gz
mpd-4ee8396f417d15c161b425c6f8c15fe845242434.tar.xz
mpd-4ee8396f417d15c161b425c6f8c15fe845242434.zip
use the notify API in the main thread
git-svn-id: https://svn.musicpd.org/mpd/trunk@7283 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/player.c b/src/player.c
index a8bb2404d..07c074060 100644
--- a/src/player.c
+++ b/src/player.c
@@ -33,9 +33,6 @@
#include "sig_handlers.h"
#include "os_compat.h"
-static pthread_cond_t main_wakeup = PTHREAD_COND_INITIALIZER;
-static pthread_mutex_t main_wakeup_mutex = PTHREAD_MUTEX_INITIALIZER;
-
static void playerCloseAudio(void);
void wakeup_player_nb(void)
@@ -48,12 +45,7 @@ static void wakeup_player(void)
{
PlayerControl *pc = &(getPlayerData()->playerControl);
notifySignal(&pc->notify);
- pthread_cond_wait(&main_wakeup, &main_wakeup_mutex);
-}
-
-void wakeup_main_task(void)
-{
- pthread_cond_signal(&main_wakeup);
+ wait_main_task();
}
void player_sleep(void)