notify: added notify_deinit()
Destroy the mutex when it is not used anymore.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user