mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 16:35:28 +00:00
alarm: fix bug in _setup_alarm
We did not set the correct now_period previously but it wasn't conspicuous because the bug triggered not before a full period had passed which on most platforms is a pretty long time. Ref #2490
This commit is contained in:
parent
9705c90d87
commit
df71e02ef6
@ -198,7 +198,7 @@ void Alarm_scheduler::_setup_alarm(Alarm &alarm, Alarm::Time period, Alarm::Time
|
|||||||
if (alarm._active)
|
if (alarm._active)
|
||||||
_unsynchronized_dequeue(&alarm);
|
_unsynchronized_dequeue(&alarm);
|
||||||
|
|
||||||
alarm._assign(period, deadline, _now > deadline, this);
|
alarm._assign(period, deadline, _now > deadline ? !_now_period : _now_period, this);
|
||||||
|
|
||||||
_unsynchronized_enqueue(&alarm);
|
_unsynchronized_enqueue(&alarm);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user