timeout: use uint64_t for all plain time values

This enforces the use of unsigned 64-bit values for time in the duration type,
the timeout framework, the timer session, the userland timer-drivers, and the
alarm framework on all platforms. The commit also adapts the code that uses
these tools accross all basic repositories (base, base-*, os. gems, libports,
ports, dde_*) to use unsigned 64-bit values for time as well as far as this
does not imply profound modifications.

Fixes #3208
This commit is contained in:
Martin Stein
2019-04-09 15:46:36 +02:00
committed by Christian Helmuth
parent e072ee480b
commit 181c78d482
122 changed files with 537 additions and 609 deletions

View File

@@ -63,7 +63,7 @@ class Scout::Platform
Timer::Connection _timer { _env };
unsigned long _ticks = 0;
Genode::uint64_t _ticks = 0;
void _handle_timer()
{
@@ -128,7 +128,7 @@ class Scout::Platform
/**
* Get timer ticks in miilliseconds
*/
unsigned long timer_ticks() const { return _ticks; }
Genode::uint64_t timer_ticks() const { return _ticks; }
/**
* Register event handler

View File

@@ -130,7 +130,7 @@ struct Main : Scout::Event_handler
bool const _launchpad_initialized = (_init_launchpad(), true);
unsigned long _old_time = _platform.timer_ticks();
Genode::uint64_t _old_time = _platform.timer_ticks();
void handle_event(Scout::Event const &event) override
{
@@ -147,7 +147,7 @@ struct Main : Scout::Event_handler
Tick::handle(_platform.timer_ticks());
/* perform periodic redraw */
unsigned long const curr_time = _platform.timer_ticks();
Genode::uint64_t const curr_time = _platform.timer_ticks();
if (!_platform.event_pending() && ((curr_time - _old_time > 20)
|| (curr_time < _old_time))) {
_old_time = curr_time;

View File

@@ -121,7 +121,7 @@ struct Scout::Main : Scout::Event_handler
Scout::Point _mouse_position { };
unsigned long _old_time = _platform.timer_ticks();
Genode::uint64_t _old_time = _platform.timer_ticks();
void handle_event(Scout::Event const &event) override
{
@@ -156,7 +156,7 @@ struct Scout::Main : Scout::Event_handler
Tick::handle(_platform.timer_ticks());
/* perform periodic redraw */
unsigned long curr_time = _platform.timer_ticks();
Genode::uint64_t curr_time = _platform.timer_ticks();
if (!_platform.event_pending() && ((curr_time - _old_time > 20)
|| (curr_time < _old_time))) {
_old_time = curr_time;

View File

@@ -199,8 +199,8 @@ class Liquid_fb::Main : public Scout::Event_handler
bool _services_initialized = (init_services(_env, _input_session_component), true);
unsigned long _curr_time = _platform.timer_ticks();
unsigned long _old_time = _curr_time;
Genode::uint64_t _curr_time = _platform.timer_ticks();
Genode::uint64_t _old_time = _curr_time;
void _handle_config()
{