aboutsummaryrefslogtreecommitdiffstats
path: root/src/notify.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-27 20:56:06 +0100
committerMax Kellermann <max@duempel.org>2008-12-27 20:56:06 +0100
commited9668f638ec3a31096821648f289b8a243f4ab2 (patch)
tree4ef39af2684f7aea0d4608f3413b68b7eb5b71a5 /src/notify.h
parente8c44782d0014ac72c155616a3b3272824b2ff96 (diff)
downloadmpd-ed9668f638ec3a31096821648f289b8a243f4ab2.tar.gz
mpd-ed9668f638ec3a31096821648f289b8a243f4ab2.tar.xz
mpd-ed9668f638ec3a31096821648f289b8a243f4ab2.zip
notify: use GLib locking
Use GLib locking (GMutex, GCond) instead of pthread because GLib is more portable, e.g. on mingw32.
Diffstat (limited to 'src/notify.h')
-rw-r--r--src/notify.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/notify.h b/src/notify.h
index 13b7dbe2e..cb4815357 100644
--- a/src/notify.h
+++ b/src/notify.h
@@ -19,20 +19,16 @@
#ifndef MPD_NOTIFY_H
#define MPD_NOTIFY_H
+#include <glib.h>
+
#include <stdbool.h>
-#include <pthread.h>
struct notify {
- pthread_mutex_t mutex;
- pthread_cond_t cond;
+ GMutex *mutex;
+ GCond *cond;
bool pending;
};
-#define NOTIFY_INITIALIZER { \
- .mutex = PTHREAD_MUTEX_INITIALIZER, \
- .cond = PTHREAD_COND_INITIALIZER, \
-}
-
void notify_init(struct notify *notify);
void notify_deinit(struct notify *notify);