diff options
Diffstat (limited to 'kern/timer.h')
-rw-r--r-- | kern/timer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kern/timer.h b/kern/timer.h index 46616686..a082c538 100644 --- a/kern/timer.h +++ b/kern/timer.h @@ -23,6 +23,7 @@ #include <stdint.h> +#include <kern/atomic.h> #include <kern/init.h> /* @@ -47,7 +48,7 @@ typedef void (*timer_fn_t)(struct timer *); static inline uint64_t timer_get_time(const struct timer *timer) { - return timer->ticks; /* TODO atomic */ + return atomic_load(&timer->ticks, ATOMIC_RELAXED); } /* |