mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-24 07:46:42 +00:00
dde_kit: Allow re-scheduling from timer handler
Prior this change, the attempt to re-schedule a timer from its timer handler resulted in a clear '_pending' flag. This caused the timer event to disappear from the scheduling queue without the handler being called ever again. By resetting the '_pending' value before calling the hander, we prevent a re-scheduled '_pending' flag to be cleared immediately after calling the handler.
This commit is contained in:
parent
0f663991c1
commit
31d2730c9a
@ -138,8 +138,8 @@ class dde_kit_timer : public Alarm, public List<dde_kit_timer>::Element
|
||||
{
|
||||
/* if timer is really pending, call registered handler function */
|
||||
if (_pending) {
|
||||
_handler(_priv);
|
||||
_pending = false;
|
||||
_handler(_priv);
|
||||
}
|
||||
|
||||
/* do not schedule again */
|
||||
|
Loading…
Reference in New Issue
Block a user