projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'urcu/ht-shrink-help' into urcu/ht-shrink
[urcu.git]
/
tests
/
test_cycles_per_loop.c
diff --git
a/tests/test_cycles_per_loop.c
b/tests/test_cycles_per_loop.c
index 64b160b775ca63233569c9b680f8997dcb8bbc45..cafa309b9d35e6f8d932e62f56a72482470b28ba 100644
(file)
--- a/
tests/test_cycles_per_loop.c
+++ b/
tests/test_cycles_per_loop.c
@@
-6,16
+6,17
@@
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
- cpu_relax();
+ c
aa_c
pu_relax();
}
int main()
{
cycles_t time1, time2;
}
int main()
{
cycles_t time1, time2;
- time1 = get_cycles();
+ time1 =
caa_
get_cycles();
loop_sleep(NR_LOOPS);
loop_sleep(NR_LOOPS);
- time2 = get_cycles();
+ time2 =
caa_
get_cycles();
printf("CPU clock cycles per loop: %g\n", (time2 - time1) /
(double)NR_LOOPS);
printf("CPU clock cycles per loop: %g\n", (time2 - time1) /
(double)NR_LOOPS);
+ return 0;
}
}
This page took
0.023548 seconds
and
4
git commands to generate.