b743828979f138dfee737639021c6a464f5b5401
1 // SPDX-FileCopyrightText: 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Userspace RCU library - test program
13 #include <sys/types.h>
20 #include <urcu/arch.h>
21 #include <urcu/assert.h>
23 #ifndef DYNAMIC_LINK_TEST
26 #define debug_yield_read()
30 static inline void loop_sleep(unsigned long loops
)
42 caa_cycles_t time1
, time2
;
43 caa_cycles_t time_tot
= 0;
46 for (i
= 0; i
< TESTS
; i
++) {
47 time1
= caa_get_cycles();
49 time2
= caa_get_cycles();
50 time_tot
+= time2
- time1
;
52 cpl
= ((double)time_tot
) / (double)TESTS
/ (double)LOOPS
;
54 printf("CALIBRATION : %g cycles per loop\n", cpl
);
55 printf("time_tot = %llu, LOOPS = %d, TESTS = %d\n",
56 (unsigned long long) time_tot
, LOOPS
, TESTS
);
This page took 0.039947 seconds and 3 git commands to generate.