Cleanup: cast pthread_self() return value to unsigned long
[urcu.git] / tests / test_urcu_timing.c
index 44235ce5c774e4bdf6091c08cac432f38325fade..4de8896b77d024abe2d11b43ba5b9414f1bbbef3 100644 (file)
@@ -107,7 +107,8 @@ void *thr_reader(void *arg)
        cycles_t time1, time2;
 
        printf("thread_begin %s, thread id : %lx, tid %lu\n",
-                       "reader", pthread_self(), (unsigned long)gettid());
+                       "reader", (unsigned long) pthread_self(),
+                       (unsigned long) gettid());
        sleep(2);
 
        rcu_register_thread();
@@ -131,7 +132,8 @@ void *thr_reader(void *arg)
 
        sleep(2);
        printf("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);
 
 }
@@ -143,7 +145,8 @@ void *thr_writer(void *arg)
        cycles_t time1, time2;
 
        printf("thread_begin %s, thread id : %lx, tid %lu\n",
-                       "writer", pthread_self(), (unsigned long)gettid());
+                       "writer", (unsigned long) pthread_self(),
+                       (unsigned long) gettid());
        sleep(2);
 
        for (i = 0; i < OUTER_WRITE_LOOP; i++) {
@@ -171,7 +174,8 @@ void *thr_writer(void *arg)
        }
 
        printf("thread_end %s, thread id : %lx, tid %lu\n",
-                       "writer", pthread_self(), (unsigned long)gettid());
+                       "writer", (unsigned long) pthread_self(),
+                       (unsigned long) gettid());
        return ((void*)2);
 }
 
@@ -197,7 +201,8 @@ int main(int argc, char **argv)
        tid_writer = malloc(sizeof(*tid_writer) * num_write);
 
        printf("thread %-6s, thread id : %lx, tid %lu\n",
-                       "main", pthread_self(), (unsigned long)gettid());
+                       "main", (unsigned long) pthread_self(),
+                       (unsigned long) gettid());
 
        for (i = 0; i < NR_READ; i++) {
                err = pthread_create(&tid_reader[i], NULL, thr_reader,
This page took 0.024542 seconds and 4 git commands to generate.