aboutsummaryrefslogtreecommitdiffstats
path: root/src/notify.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-26 09:57:11 +0200
committerMax Kellermann <max@duempel.org>2008-09-26 09:57:11 +0200
commit58554e14f9995fdafe2338a69a42d9192b96f712 (patch)
tree83881d1e2131795581c822aa5cd01ddce42cf80f /src/notify.h
parent323e86489fb9544b3a2faa9e9004ac0b72bf01ca (diff)
downloadmpd-58554e14f9995fdafe2338a69a42d9192b96f712.tar.gz
mpd-58554e14f9995fdafe2338a69a42d9192b96f712.tar.xz
mpd-58554e14f9995fdafe2338a69a42d9192b96f712.zip
notify: protect notify->pending with the mutex
There was a known deadlocking bug in the notify library: when the other thread set notify->pending after the according check in notify_wait(), the latter thread was deadlocked. Resolve this by synchronizing all accesses to notify->pending with the notify object's mutex. Since notify_signal_sync() was never used, we can remove it. As a consequence, we don't need notify_enter() and notify_leave() anymore; eliminate them, too.
Diffstat (limited to '')
-rw-r--r--src/notify.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/notify.h b/src/notify.h
index b9fd6e041..b8018232d 100644
--- a/src/notify.h
+++ b/src/notify.h
@@ -37,17 +37,6 @@ void notify_init(struct notify *notify);
void notify_deinit(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(struct notify *notify);
-
-/**
- * Neutralize notify_leave().
- */
-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().
*/
@@ -58,10 +47,4 @@ void notify_wait(struct 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(struct notify *notify);
-
#endif