X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_mutex.c;fp=tests%2Ftest_mutex.c;h=451ab1c31172ef1922570db4df97e038ba20351c;hp=43d0dace7169d7d8e30ea502400cb2072d1721eb;hb=6ff854acfa013195bdb71dddc654ec76a4c296c9;hpb=8cbc3cdca7f1320e3c2412654091fe94931ce62b 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);