notify: added notify_deinit()

Destroy the mutex when it is not used anymore.
This commit is contained in:
Max Kellermann
2008-09-24 07:14:11 +02:00
parent ee1d723ad7
commit a0272c2d61
9 changed files with 36 additions and 0 deletions

View File

@@ -34,6 +34,12 @@ void notify_init(struct notify *notify)
notify->pending = 0;
}
void notify_deinit(struct notify *notify)
{
pthread_mutex_destroy(&notify->mutex);
pthread_cond_destroy(&notify->cond);
}
void notify_enter(struct notify *notify)
{
pthread_mutex_lock(&notify->mutex);