mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
make _timer_ticks_to_us 64bit safe
fixes PIT running to fast on seL4 x86_64
This commit is contained in:
parent
a255ffaee9
commit
f4aff87e25
@ -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,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user