update test
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 20 Aug 2008 16:28:44 +0000 (16:28 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 20 Aug 2008 16:28:44 +0000 (16:28 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@3041 04897980-b3bd-0310-b5e0-8ef037075253

trunk/tests/kernel/test-wbias-rwlock.c

index c807019631cfa36f7e4e3c64dbf1a41514350c97..ea26ca12ae9b8cad6f02b11d65595e8c95586b14 100644 (file)
@@ -139,7 +139,8 @@ static inline cycles_t calibrate_cycles(cycles_t cycles)
 
 struct proc_dir_entry *pentry = NULL;
 
-static int p_or_np_reader_thread(void *data, int preemptable)
+static int p_or_np_reader_thread(const char *typename,
+               void *data, int preemptable)
 {
        int i;
        int prev, cur;
@@ -147,7 +148,7 @@ static int p_or_np_reader_thread(void *data, int preemptable)
        cycles_t time1, time2, delay, delaymax = 0, delaymin = ULLONG_MAX,
                delayavg = 0;
 
-       printk("reader_thread/%lu runnning\n", (unsigned long)data);
+       printk("%s/%lu runnning\n", typename, (unsigned long)data);
        do {
                iter++;
                if (!preemptable)
@@ -187,12 +188,13 @@ static int p_or_np_reader_thread(void *data, int preemptable)
                        msleep(THREAD_READER_DELAY);
        } while (!kthread_should_stop());
        if (!iter) {
-               printk("reader_thread/%lu iterations : %lu",
+               printk("%s/%lu iterations : %lu", typename,
                        (unsigned long)data, iter);
        } else {
                delayavg /= iter;
-               printk("reader_thread/%lu iterations : %lu, "
+               printk("%s/%lu iterations : %lu, "
                        "lock delay [min,avg,max] %llu,%llu,%llu cycles\n",
+                       typename,
                        (unsigned long)data, iter,
                        calibrate_cycles(delaymin),
                        calibrate_cycles(delayavg),
@@ -203,12 +205,12 @@ static int p_or_np_reader_thread(void *data, int preemptable)
 
 static int preader_thread(void *data)
 {
-       return p_or_np_reader_thread(data, 1);
+       return p_or_np_reader_thread("preader_thread", data, 1);
 }
 
 static int npreader_thread(void *data)
 {
-       return p_or_np_reader_thread(data, 0);
+       return p_or_np_reader_thread("npreader_thread", data, 0);
 }
 
 static int trylock_reader_thread(void *data)
This page took 0.025111 seconds and 4 git commands to generate.