diff options
author | Max Kellermann <max@duempel.org> | 2008-09-24 07:14:11 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-24 07:14:11 +0200 |
commit | a0272c2d615e4579e8efb767cc6c28302b2c92cd (patch) | |
tree | f8868d8df4a4fd6defbb17db3d5d438903cbeff5 /src/notify.c | |
parent | ee1d723ad7ec94e0db09ae8bab61a8952bfaaa32 (diff) | |
download | mpd-a0272c2d615e4579e8efb767cc6c28302b2c92cd.tar.gz mpd-a0272c2d615e4579e8efb767cc6c28302b2c92cd.tar.xz mpd-a0272c2d615e4579e8efb767cc6c28302b2c92cd.zip |
notify: added notify_deinit()
Destroy the mutex when it is not used anymore.
Diffstat (limited to 'src/notify.c')
-rw-r--r-- | src/notify.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/notify.c b/src/notify.c index 4f8a0d296..edb77f66d 100644 --- a/src/notify.c +++ b/src/notify.c @@ -34,6 +34,12 @@ void notify_init(struct notify *notify) notify->pending = 0; } +void notify_deinit(struct notify *notify) +{ + pthread_mutex_destroy(¬ify->mutex); + pthread_cond_destroy(¬ify->cond); +} + void notify_enter(struct notify *notify) { pthread_mutex_lock(¬ify->mutex); |