aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-24 07:16:59 +0200
committerMax Kellermann <max@duempel.org>2008-09-24 07:16:59 +0200
commit8f4ebf0caf8514fb7838eb27b848e5a4cccaae12 (patch)
treebd81b3bc066780ed016760f243b373948f2e4805 /src
parenta0272c2d615e4579e8efb767cc6c28302b2c92cd (diff)
downloadmpd-8f4ebf0caf8514fb7838eb27b848e5a4cccaae12.tar.gz
mpd-8f4ebf0caf8514fb7838eb27b848e5a4cccaae12.tar.xz
mpd-8f4ebf0caf8514fb7838eb27b848e5a4cccaae12.zip
notify: added macro NOTIFY_INITIALIZER
With the macro NOTIFY_INITIALIZER, you can statically initialize a notify object.
Diffstat (limited to '')
-rw-r--r--src/notify.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/notify.h b/src/notify.h
index e727a0a34..b9fd6e041 100644
--- a/src/notify.h
+++ b/src/notify.h
@@ -27,6 +27,11 @@ typedef struct notify {
int pending;
} Notify;
+#define NOTIFY_INITIALIZER { \
+ .mutex = PTHREAD_MUTEX_INITIALIZER, \
+ .cond = PTHREAD_COND_INITIALIZER, \
+}
+
void notify_init(struct notify *notify);
void notify_deinit(struct notify *notify);