]> git.saurik.com Git - apple/xnu.git/blobdiff - tests/quiesce_counter.c
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tests / quiesce_counter.c
index c10df2ad9ae754d8b5c65911760e29d45c7eb4d6..18f54d76d3dd15b441d630cb63a7970342bed75c 100644 (file)
@@ -41,6 +41,8 @@
 #include <unistd.h>
 #include <sys/sysctl.h>
 
+T_GLOBAL_META(T_META_RUN_CONCURRENTLY(true));
+
 #ifndef _COMM_PAGE_CPU_QUIESCENT_COUNTER
 
 T_DECL(test_quiescent_counter, "Validate that _COMM_PAGE_CPU_QUIESCENT_COUNTER increments",
@@ -66,9 +68,9 @@ T_DECL(test_quiescent_counter, "Validate that _COMM_PAGE_CPU_QUIESCENT_COUNTER i
 
        T_ASSERT_GT(cpu_checkin_min_interval, 0, "kern.cpu_checkin_interval should be > 0");
 
-       uint64_t* commpage_addr = (uint64_t *)(uintptr_t)_COMM_PAGE_CPU_QUIESCENT_COUNTER;
+       COMM_PAGE_SLOT_TYPE(uint64_t) commpage_addr = COMM_PAGE_SLOT(uint64_t, CPU_QUIESCENT_COUNTER);
 
-       T_LOG("address of _COMM_PAGE_CPU_QUIESCENT_COUNTER is %p", (void*) commpage_addr);
+       T_LOG("address of _COMM_PAGE_CPU_QUIESCENT_COUNTER is %p", commpage_addr);
 
        uint64_t counter = *commpage_addr;
        uint64_t last_counter = counter;