diff options
author | Richard Braun <rbraun@sceen.net> | 2017-08-31 23:17:47 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-08-31 23:17:47 +0200 |
commit | b9ec5cca6f6e3fd571b2e534d36e2498e488164c (patch) | |
tree | eb3053068ba3451e41d655f883a9fcee8efff238 /kern/timer.h | |
parent | 4e0b9efa25b58f7fcaf485349f66bd694390080a (diff) |
kern/timer: improve access synchronization
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); } /* |