notify: add function notify_clear()

This commit is contained in:
Max Kellermann 2010-08-19 11:03:53 +02:00
parent 676739c426
commit 625e4755d1
2 changed files with 12 additions and 0 deletions

View File

@ -48,3 +48,10 @@ void notify_signal(struct notify *notify)
g_cond_signal(notify->cond);
g_mutex_unlock(notify->mutex);
}
void notify_clear(struct notify *notify)
{
g_mutex_lock(notify->mutex);
notify->pending = false;
g_mutex_unlock(notify->mutex);
}

View File

@ -45,4 +45,9 @@ void notify_wait(struct notify *notify);
*/
void notify_signal(struct notify *notify);
/**
* Clears a pending notification.
*/
void notify_clear(struct notify *notify);
#endif