Cleanup: cast pthread_self() return value to unsigned long
[urcu.git] / tests / test_rwlock.c
index 45dad7869427fc434a021f5bddc60f3f7590ea06..b787364ee8023045220ab2c868b2a8da3682b5e9 100644 (file)
@@ -192,7 +192,8 @@ void *thr_reader(void *_count)
        unsigned long long *count = _count;
 
        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();
 
@@ -213,7 +214,8 @@ void *thr_reader(void *_count)
 
        *count = 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);
 
 }
@@ -223,7 +225,8 @@ void *thr_writer(void *_count)
        unsigned long long *count = _count;
 
        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();
 
@@ -247,7 +250,8 @@ void *thr_writer(void *_count)
        }
 
        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());
        *count = URCU_TLS(nr_writes);
        return ((void*)2);
 }
@@ -353,7 +357,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.023026 seconds and 4 git commands to generate.