]> git.saurik.com Git - apple/xnu.git/blobdiff - tests/quiesce_counter.c
xnu-7195.81.3.tar.gz
[apple/xnu.git] / tests / quiesce_counter.c
index 563d13d0474801be024beb6c168b9015516c3d11..d864d85319665ef4cad611bee8fe680869fb030d 100644 (file)
 #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",
-       T_META_CHECK_LEAKS(false))
+    T_META_CHECK_LEAKS(false))
 {
        T_SKIP("_COMM_PAGE_CPU_QUIESCENT_COUNTER doesn't exist on this system");
 }
@@ -52,7 +54,7 @@ T_DECL(test_quiescent_counter, "Validate that _COMM_PAGE_CPU_QUIESCENT_COUNTER i
 #else /* _COMM_PAGE_CPU_QUIESCENT_COUNTER */
 
 T_DECL(test_quiescent_counter, "Validate that _COMM_PAGE_CPU_QUIESCENT_COUNTER increments",
-       T_META_CHECK_LEAKS(false))
+    T_META_CHECK_LEAKS(false))
 {
        int rv;
 
@@ -74,8 +76,7 @@ T_DECL(test_quiescent_counter, "Validate that _COMM_PAGE_CPU_QUIESCENT_COUNTER i
        uint64_t last_counter = counter;
        T_LOG("first value of _COMM_PAGE_CPU_QUIESCENT_COUNTER is %llu", counter);
 
-       for (int i = 0 ; i < 10 ; i++)
-       {
+       for (int i = 0; i < 10; i++) {
                sleep(1);
 
                last_counter = counter;
@@ -88,4 +89,3 @@ T_DECL(test_quiescent_counter, "Validate that _COMM_PAGE_CPU_QUIESCENT_COUNTER i
 }
 
 #endif /* _COMM_PAGE_CPU_QUIESCENT_COUNTER */
-