notify: add function notify_clear()
This commit is contained in:
parent
676739c426
commit
625e4755d1
@ -48,3 +48,10 @@ void notify_signal(struct notify *notify)
|
|||||||
g_cond_signal(notify->cond);
|
g_cond_signal(notify->cond);
|
||||||
g_mutex_unlock(notify->mutex);
|
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);
|
void notify_signal(struct notify *notify);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears a pending notification.
|
||||||
|
*/
|
||||||
|
void notify_clear(struct notify *notify);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user