X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_mutex.c;h=451ab1c31172ef1922570db4df97e038ba20351c;hb=372b9ad7acc40810bbcec6a796c71b54901b3ca7;hp=43d0dace7169d7d8e30ea502400cb2072d1721eb;hpb=95bc7fb90c36ee10dc171a23e8783eff30072b7b;p=urcu.git diff --git a/tests/test_mutex.c b/tests/test_mutex.c index 43d0dac..451ab1c 100644 --- a/tests/test_mutex.c +++ b/tests/test_mutex.c @@ -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);