Compared with v2, an atomic operation is used to avoid data race. About the idea suggested by Luca, exposing the uptime with a kernel device that can be memory mapped, I haven't came out with an implementation I'm happy with. Any suggestion is welcome :).
Zhaoming Luo (1): Add a mach host operation which returns elapsed time since bootup include/mach/mach_host.defs | 7 +++++++ kern/mach_clock.c | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) -- 2.45.2