diff options
author | Max Kellermann <max@duempel.org> | 2008-09-24 07:05:43 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-24 07:05:43 +0200 |
commit | 770b1405345710994b4d7fda55e26cad195c2742 (patch) | |
tree | 7a762b785cc6279a285e025bdf23effd22fbb1dc /src/notify.h | |
parent | 35216db8dbfb9865b0e2ec60495bf72fa235c79d (diff) | |
download | mpd-770b1405345710994b4d7fda55e26cad195c2742.tar.gz mpd-770b1405345710994b4d7fda55e26cad195c2742.tar.xz mpd-770b1405345710994b4d7fda55e26cad195c2742.zip |
notify: declare "struct notify"
"struct notify" is the same as the "Notify" typedef. It can be
forward-declared and has a lower case name.
Diffstat (limited to '')
-rw-r--r-- | src/notify.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/notify.h b/src/notify.h index 0fbc74479..a246f663a 100644 --- a/src/notify.h +++ b/src/notify.h @@ -21,40 +21,40 @@ #include "os_compat.h" -typedef struct _Notify { +typedef struct notify { pthread_mutex_t mutex; pthread_cond_t cond; int pending; } Notify; -int notify_init(Notify *notify); +int notify_init(struct notify *notify); /** * The thread which shall be notified by this object must call this * function before any notify_wait() invocation. It locks the mutex. */ -void notify_enter(Notify *notify); +void notify_enter(struct notify *notify); /** * Neutralize notify_leave(). */ -void notify_leave(Notify *notify); +void notify_leave(struct notify *notify); /** * Wait for a notification. Return immediately if we have already * been notified since we last returned from notify_wait(). */ -void notify_wait(Notify *notify); +void notify_wait(struct notify *notify); /** * Notify the thread. This function never blocks. */ -void notify_signal(Notify *notify); +void notify_signal(struct notify *notify); /** * Notify the thread synchonously, i.e. wait until it has received the * notification. */ -void notify_signal_sync(Notify *notify); +void notify_signal_sync(struct notify *notify); #endif |