X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_looplen.c;h=01394e0520292a892673d7d67f07210d4acd29e3;hp=9e2ee2be780653badab3127f9f42bc07a58cb312;hb=06f22bdbb0c4c4d5db42a2e2dc35818aa61415be;hpb=ec4e58a3aba2084440012f8ccac3a31eb6101183 diff --git a/tests/test_looplen.c b/tests/test_looplen.c index 9e2ee2b..01394e0 100644 --- a/tests/test_looplen.c +++ b/tests/test_looplen.c @@ -3,7 +3,7 @@ * * Userspace RCU library - test program * - * Copyright February 2009 - Mathieu Desnoyers + * Copyright February 2009 - Mathieu Desnoyers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -60,7 +61,7 @@ static inline pid_t gettid(void) static inline void loop_sleep(unsigned long l) { while(l-- != 0) - cpu_relax(); + caa_cpu_relax(); } #define LOOPS 1048576 @@ -74,9 +75,9 @@ int main(int argc, char **argv) double cpl; for (i = 0; i < TESTS; i++) { - time1 = get_cycles(); + time1 = caa_get_cycles(); loop_sleep(LOOPS); - time2 = get_cycles(); + time2 = caa_get_cycles(); time_tot += time2 - time1; } cpl = ((double)time_tot) / (double)TESTS / (double)LOOPS;