From ed9668f638ec3a31096821648f289b8a243f4ab2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 27 Dec 2008 20:56:06 +0100 Subject: notify: use GLib locking Use GLib locking (GMutex, GCond) instead of pthread because GLib is more portable, e.g. on mingw32. --- src/notify.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/notify.h') 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 + #include -#include 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); -- cgit v1.2.3