]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/wrappers/mach_approximate_time.c
xnu-7195.101.1.tar.gz
[apple/xnu.git] / libsyscall / wrappers / mach_approximate_time.c
index cb199cf070182dd288f17ebb2d87347a4ce198a3..50fc667b9f20fa466e171d9812462c855b58b979 100644 (file)
@@ -30,9 +30,8 @@ extern uint64_t mach_absolute_time(void);
 uint64_t
 mach_approximate_time(void)
 {
-       uint8_t supported = *((uint8_t *)_COMM_PAGE_APPROX_TIME_SUPPORTED);
-       if (supported) {
-               return *((uint64_t *)_COMM_PAGE_APPROX_TIME);
+       if (COMM_PAGE_READ(uint8_t, APPROX_TIME_SUPPORTED)) {
+               return COMM_PAGE_READ(uint64_t, APPROX_TIME);
        }
        return mach_absolute_time();
 }