Commit 625e4755 authored by Max Kellermann's avatar Max Kellermann

notify: add function notify_clear()

parent 676739c4
......@@ -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);
}
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment