diff options
author | Max Kellerman <max@duempel.org> | 2008-06-01 22:24:44 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-06-01 22:24:44 +0000 |
commit | 97698bd4aaf168620205fea26f089e7b1acc869d (patch) | |
tree | 51fc58d0a8b800b40d81ffa5a3e31ad5e55486f1 /src | |
parent | e0be3aad20f9b4c95af047e0e64aa01a7a972886 (diff) | |
download | mpd-97698bd4aaf168620205fea26f089e7b1acc869d.tar.gz mpd-97698bd4aaf168620205fea26f089e7b1acc869d.tar.xz mpd-97698bd4aaf168620205fea26f089e7b1acc869d.zip |
notify: don't use camelCase in notify.[ch]
git-svn-id: https://svn.musicpd.org/mpd/trunk@7367 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r-- | src/decode.c | 8 | ||||
-rw-r--r-- | src/notify.c | 14 | ||||
-rw-r--r-- | src/notify.h | 18 | ||||
-rw-r--r-- | src/player.c | 8 | ||||
-rw-r--r-- | src/playerData.c | 4 |
5 files changed, 26 insertions, 26 deletions
diff --git a/src/decode.c b/src/decode.c index 96a84b21a..5890d49d7 100644 --- a/src/decode.c +++ b/src/decode.c @@ -40,19 +40,19 @@ void decoder_wakeup_player(void) void decoder_sleep(void) { - notifyWait(&dc.notify); + notify_wait(&dc.notify); wakeup_player_nb(); } static void player_wakeup_decoder_nb(void) { - notifySignal(&dc.notify); + notify_signal(&dc.notify); } /* called from player_task */ static void player_wakeup_decoder(void) { - notifySignal(&dc.notify); + notify_signal(&dc.notify); player_sleep(); } @@ -322,7 +322,7 @@ stop_no_close: static void * decoder_task(mpd_unused void *arg) { - notifyEnter(&dc.notify); + notify_enter(&dc.notify); while (1) { assert(dc.state == DECODE_STATE_STOP); diff --git a/src/notify.c b/src/notify.c index 5d53b231d..ed46829ae 100644 --- a/src/notify.c +++ b/src/notify.c @@ -18,7 +18,7 @@ #include "notify.h" -int notifyInit(Notify *notify) +int notify_init(Notify *notify) { int ret; @@ -37,32 +37,32 @@ int notifyInit(Notify *notify) return 0; } -void notifyEnter(Notify *notify) +void notify_enter(Notify *notify) { pthread_mutex_lock(¬ify->mutex); } -void notifyLeave(Notify *notify) +void notify_leave(Notify *notify) { pthread_mutex_unlock(¬ify->mutex); } -void notifyWait(Notify *notify) +void notify_wait(Notify *notify) { if (!notify->pending) pthread_cond_wait(¬ify->cond, ¬ify->mutex); notify->pending = 0; } -void notifySignal(Notify *notify) +void notify_signal(Notify *notify) { notify->pending = 1; pthread_cond_signal(¬ify->cond); } -void notifySignalSync(Notify *notify) +void notify_signal_sync(Notify *notify) { pthread_mutex_lock(¬ify->mutex); - notifySignal(notify); + notify_signal(notify); pthread_mutex_unlock(¬ify->mutex); } diff --git a/src/notify.h b/src/notify.h index f79518f8f..0fbc74479 100644 --- a/src/notify.h +++ b/src/notify.h @@ -27,34 +27,34 @@ typedef struct _Notify { int pending; } Notify; -int notifyInit(Notify *notify); +int notify_init(Notify *notify); /** * The thread which shall be notified by this object must call this - * function before any notifyWait() invocation. It locks the mutex. + * function before any notify_wait() invocation. It locks the mutex. */ -void notifyEnter(Notify *notify); +void notify_enter(Notify *notify); /** - * Neutralize notifyLeave(). + * Neutralize notify_leave(). */ -void notifyLeave(Notify *notify); +void notify_leave(Notify *notify); /** * Wait for a notification. Return immediately if we have already - * been notified since we last returned from notifyWait(). + * been notified since we last returned from notify_wait(). */ -void notifyWait(Notify *notify); +void notify_wait(Notify *notify); /** * Notify the thread. This function never blocks. */ -void notifySignal(Notify *notify); +void notify_signal(Notify *notify); /** * Notify the thread synchonously, i.e. wait until it has received the * notification. */ -void notifySignalSync(Notify *notify); +void notify_signal_sync(Notify *notify); #endif diff --git a/src/player.c b/src/player.c index 80e0d2375..4d7762a0f 100644 --- a/src/player.c +++ b/src/player.c @@ -38,23 +38,23 @@ static void playerCloseAudio(void); void wakeup_player_nb(void) { - notifySignal(&pc.notify); + notify_signal(&pc.notify); } static void wakeup_player(void) { - notifySignal(&pc.notify); + notify_signal(&pc.notify); wait_main_task(); } void player_sleep(void) { - notifyWait(&pc.notify); + notify_wait(&pc.notify); } static void * player_task(mpd_unused void *arg) { - notifyEnter(&pc.notify); + notify_enter(&pc.notify); while (1) { if (pc.play) { diff --git a/src/playerData.c b/src/playerData.c index 56dee348c..103ec2980 100644 --- a/src/playerData.c +++ b/src/playerData.c @@ -79,7 +79,7 @@ void initPlayerData(void) ob_init(buffered_chunks); - notifyInit(&pc.notify); + notify_init(&pc.notify); pc.error = PLAYER_ERROR_NOERROR; pc.state = PLAYER_STATE_STOP; pc.queueState = PLAYER_QUEUE_BLANK; @@ -87,7 +87,7 @@ void initPlayerData(void) pc.crossFade = crossfade; pc.softwareVolume = 1000; - notifyInit(&dc.notify); + notify_init(&dc.notify); dc.state = DECODE_STATE_STOP; dc.error = DECODE_ERROR_NOERROR; } |