Cleanup: cast pthread_self() return value to unsigned long
[urcu.git] / tests / test_mutex.c
index 43d0dace7169d7d8e30ea502400cb2072d1721eb..451ab1c31172ef1922570db4df97e038ba20351c 100644 (file)
@@ -196,7 +196,8 @@ void *thr_reader(void *data)
        unsigned long tidx = (unsigned long)data;
 
        printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n",
-                       "reader", pthread_self(), (unsigned long)gettid());
+                       "reader", (unsigned long) pthread_self(),
+                       (unsigned long) gettid());
 
        set_affinity();
 
@@ -217,7 +218,8 @@ void *thr_reader(void *data)
 
        tot_nr_reads[tidx] = URCU_TLS(nr_reads);
        printf_verbose("thread_end %s, thread id : %lx, tid %lu\n",
-                       "reader", pthread_self(), (unsigned long)gettid());
+                       "reader", (unsigned long) pthread_self(),
+                       (unsigned long) gettid());
        return ((void*)1);
 
 }
@@ -227,7 +229,8 @@ void *thr_writer(void *data)
        unsigned long wtidx = (unsigned long)data;
 
        printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n",
-                       "writer", pthread_self(), (unsigned long)gettid());
+                       "writer", (unsigned long) pthread_self(),
+                       (unsigned long) gettid());
 
        set_affinity();
 
@@ -251,7 +254,8 @@ void *thr_writer(void *data)
        }
 
        printf_verbose("thread_end %s, thread id : %lx, tid %lu\n",
-                       "writer", pthread_self(), (unsigned long)gettid());
+                       "writer", (unsigned long) pthread_self(),
+                       (unsigned long) gettid());
        tot_nr_writes[wtidx] = URCU_TLS(nr_writes);
        return ((void*)2);
 }
@@ -357,7 +361,8 @@ int main(int argc, char **argv)
        printf_verbose("Writer delay : %lu loops.\n", wdelay);
        printf_verbose("Reader duration : %lu loops.\n", rduration);
        printf_verbose("thread %-6s, thread id : %lx, tid %lu\n",
-                       "main", pthread_self(), (unsigned long)gettid());
+                       "main", (unsigned long) pthread_self(),
+                       (unsigned long) gettid());
 
        tid_reader = malloc(sizeof(*tid_reader) * nr_readers);
        tid_writer = malloc(sizeof(*tid_writer) * nr_writers);
This page took 0.023342 seconds and 4 git commands to generate.