move everything out of trunk
[lttv.git] / tests / kernel / test-cmpxchg.c
index 16d56a519bac82cd563dea59c424650653c79692..58264a934999e0803df4a2379b4c398b03f6e139 100644 (file)
@@ -4,18 +4,17 @@
  */
 
 
-#include <linux/config.h>
 #include <linux/jiffies.h>
 #include <linux/compiler.h>
 #include <linux/init.h>
 #include <linux/module.h>
 
-#define NR_LOOPS 2000
+#define NR_LOOPS 20000
 
 volatile int test_val = 100;
 
 
-static void do_test(void)
+static inline void do_test(void)
 {
        int val, ret;
 
@@ -24,7 +23,7 @@ static void do_test(void)
        ret = cmpxchg(&test_val, val, val+1);
 }
 
-void (*fct)(void) = do_test;
+//void (*fct)(void) = do_test;
 
 static int ltt_test_init(void)
 {
@@ -50,7 +49,7 @@ static int ltt_test_init(void)
        time = time2 - time1;
        tot_time += time;
 
-       printk(KERN_ALERT "test results : time per probe\n");
+       printk(KERN_ALERT "test results : time for cmpxchg\n");
        printk(KERN_ALERT "number of loops : %d\n", NR_LOOPS);
        printk(KERN_ALERT "total time : %llu\n", tot_time);
        //printk(KERN_ALERT "min : %llu\n", min_time);
This page took 0.023453 seconds and 4 git commands to generate.