make _timer_ticks_to_us 64bit safe

fixes PIT running to fast on seL4 x86_64
This commit is contained in:
Alexander Boettcher 2017-11-15 15:32:13 +01:00 committed by Christian Helmuth
parent a255ffaee9
commit f4aff87e25
1 changed files with 3 additions and 3 deletions

View File

@ -38,10 +38,10 @@ namespace Genode {
RESULT_T timer_ticks_to_us(RESULT_T const ticks,
TICS_PER_MS_T const ticks_per_ms)
{
enum {
enum:RESULT_T {
HALF_WIDTH = (sizeof(RESULT_T) << 2),
MSB_MASK = ~0UL << HALF_WIDTH,
LSB_MASK = ~0UL >> HALF_WIDTH,
MSB_MASK = ((RESULT_T)~0UL) << HALF_WIDTH,
LSB_MASK = ((RESULT_T)~0UL) >> HALF_WIDTH,
MSB_RSHIFT = 10,
LSB_LSHIFT = HALF_WIDTH - MSB_RSHIFT,
};