genode/repos/os/src/lib/timeout
Martin Stein 93a0c66589 timeout: do not handle timeouts while scheduling
To handle all pending timeouts in the context of scheduling a timeout
was only necessary because the Timeout framework once made use of the
Alarm framework. The method Alarm_scheduler::schedule_absolute took an
absolute deadline as argument and we couldn't change this beause the
Alarm framework was also used without the Timeout framework. We had to
calculate this absolute deadline with the now time of the Timeout
framework but the Alarm framework has its own now time that is always a
bit behind the one of the Timeout framework. This lead to bad decisisons
when finding the right position for the new timeout. Now, we can call
schedule_absolute with a relative duration and thereby fix the problem.

When we schedule an absolute timeout without considering the small time
difference, the end-time for the timeout that is calculated using the
local time value is also smaller than the expected end-time. This can
also lead to directly triggering timeouts that should have triggered
with a certain delay.

As it is not trivial to update the local time value while scheduling a
timeout _without_ calling other timeout handlers, we simply raise the
duration of the new timeout by the age of the local time value.

Issue #2704
2018-04-10 11:18:18 +02:00
..
arm timer connection: always work with microseconds 2017-08-23 14:08:36 +02:00
hw timer connection: no interpolation on arm w/o hw 2017-05-31 17:50:28 +02:00
duration.cc Add millisecond accessor to Genode::Duration value object 2017-12-21 15:01:51 +01:00
timeout.cc timeout: do not handle timeouts while scheduling 2018-04-10 11:18:18 +02:00
timer_connection_time.cc timeout: replace Duration operators by methods 2017-11-30 11:23:09 +01:00
timer_connection_timestamp.cc os/timer: interpolate time via timestamps 2017-05-31 13:16:11 +02:00
timer_connection.cc timeout: replace Duration operators by methods 2017-11-30 11:23:09 +01:00