Add `urcu_posix_assert()` as `assert()` replacement
[urcu.git] / tests / benchmark / test_looplen.c
index 16674e76ac442343b77ea27d1994a5920cd6c9e7..d969ffcc00b2d58c0add83a53df2c31148d3aefd 100644 (file)
@@ -20,7 +20,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <pthread.h>
 #include <stdlib.h>
 #include <sys/wait.h>
 #include <unistd.h>
 #include <stdio.h>
-#include <assert.h>
 #include <sched.h>
 #include <errno.h>
 
 #include <urcu/arch.h>
+#include <urcu/assert.h>
 
 #ifndef DYNAMIC_LINK_TEST
 #define _LGPL_SOURCE
@@ -51,11 +50,11 @@ static inline void loop_sleep(unsigned long loops)
 #define LOOPS 1048576
 #define TESTS 10
 
-int main(int argc, char **argv)
+int main(void)
 {
        unsigned long i;
-       cycles_t time1, time2;
-       cycles_t time_tot = 0;
+       caa_cycles_t time1, time2;
+       caa_cycles_t time_tot = 0;
        double cpl;
 
        for (i = 0; i < TESTS; i++) {
@@ -68,7 +67,7 @@ int main(int argc, char **argv)
 
        printf("CALIBRATION : %g cycles per loop\n", cpl);
        printf("time_tot = %llu, LOOPS = %d, TESTS = %d\n",
-              time_tot, LOOPS, TESTS);
+              (unsigned long long) time_tot, LOOPS, TESTS);
 
        return 0;
 }
This page took 0.023716 seconds and 4 git commands to generate.