genode/repos/os/include
Martin Stein 2633ff8661 alarm: fix information loss due to int-cast
When we have two time values of an unsigned integer type and we create
the difference and want to know wether it is positive or negative within
the same value we loose at least one half of the value range for casting
to signed integers. This was the case in the alarm scheduler when
checking wether an alarm already triggered. Even worse, we casted from
'unsigned long' to 'signed int' which caused further loss on at least
x86_64. Thus, big timeouts like ~0UL falsely triggered directly.

Now, we use an extra boolean value to remember in which period of the
time counter we are and to which period of the time counter the deadline
of an alarm belongs. This boolean switches its value each time the time
counter wraps. This way, we can avoid any casting by checking wether the
current time is of the same period as the deadline of the alarm that we
inspect. If so, the alarm is pending if "current time >= alarm
deadline", otherwise it is pending if "current time < alarm deadline".

Ref #2490
2017-10-05 17:39:56 +02:00
..
audio_in_session API documentation refinements 2017-05-31 13:16:21 +02:00
audio_out_session API documentation refinements 2017-05-31 13:16:21 +02:00
blit Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
block default ahci_drv and part_blk Block sessions to read-only 2017-08-28 16:49:51 +02:00
block_session API documentation refinements 2017-05-31 13:16:21 +02:00
cli_monitor Integrate core's RAM service into the PD service 2017-05-31 13:16:14 +02:00
decorator Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
file_system file system: track content via version counter 2017-08-17 10:59:43 +02:00
file_system_session VFS: nonblocking interface 2017-08-28 16:49:38 +02:00
framebuffer_session API documentation refinements 2017-05-31 13:16:21 +02:00
gpio Streamline exception types 2017-05-31 13:16:07 +02:00
gpio_session API documentation refinements 2017-05-31 13:16:21 +02:00
gpu_session os: add Gpu driver for Intel Gen8 HD graphics 2017-08-30 09:59:57 +02:00
init Adaptation to init refactoring 2017-03-24 16:19:56 +01:00
input Streamline exception types 2017-05-31 13:16:07 +02:00
input_session API documentation refinements 2017-05-31 13:16:21 +02:00
ldso Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
loader_session API documentation refinements 2017-05-31 13:16:21 +02:00
mixer Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
net Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
nic Replace Quota_exceeded by Insufficient_ram_quota 2017-05-31 13:16:05 +02:00
nic_bridge Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
nic_session API documentation refinements 2017-05-31 13:16:21 +02:00
nitpicker_gfx Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
nitpicker_session API documentation refinements 2017-05-31 13:16:21 +02:00
os alarm: fix information loss due to int-cast 2017-10-05 17:39:56 +02:00
packet_stream_rx Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
packet_stream_tx Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
platform_device Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
platform_session Annotate session interfaces with CAP_QUOTA 2017-05-31 13:16:04 +02:00
ram_fs file system: use Id_space instead of Node_handle_registry 2017-08-17 10:59:43 +02:00
regulator Streamline exception types 2017-05-31 13:16:07 +02:00
regulator_session API documentation refinements 2017-05-31 13:16:21 +02:00
report_rom Streamline exception types 2017-05-31 13:16:07 +02:00
report_session API documentation refinements 2017-05-31 13:16:21 +02:00
rtc_session Optional session label for Rtc connection constructor 2017-05-31 13:16:22 +02:00
spec riscv: ISA-1.9.1 and GCC-6.3.0 adaptions 2017-05-31 13:16:24 +02:00
terminal terminal: add Cell_array destructor 2017-05-31 13:16:12 +02:00
terminal_session API documentation refinements 2017-05-31 13:16:21 +02:00
timer os/timer: interpolate time via timestamps 2017-05-31 13:16:11 +02:00
timer_session timer connection: fast initial calibration 2017-08-23 14:08:37 +02:00
trace Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
uart_session API documentation refinements 2017-05-31 13:16:21 +02:00
usb usb: use if-else in packet_handler 2017-06-19 12:35:57 +02:00
usb_session API documentation refinements 2017-05-31 13:16:21 +02:00
util Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
vfs VFS: nonblocking interface 2017-08-28 16:49:38 +02:00