X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_rwlock_timing.c;h=bc7737002596a5856f278b5fcd1898292d069c83;hb=8ff97cc3836c6a2739b62af0a859511c9c284e4f;hp=628bed459af61e38afada3626e2b05e8dd659ab6;hpb=9d2614f07691a813a3c560a6c0bcd0a7be854ed5;p=urcu.git diff --git a/tests/test_rwlock_timing.c b/tests/test_rwlock_timing.c index 628bed4..bc77370 100644 --- a/tests/test_rwlock_timing.c +++ b/tests/test_rwlock_timing.c @@ -87,7 +87,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); time1 = caa_get_cycles(); @@ -104,7 +105,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); } @@ -115,7 +117,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++) { @@ -131,7 +134,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); } @@ -157,7 +161,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,