X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_perthreadlock.c;h=cfde1b6942a064f260b514b89f1bb6cb510d458f;hp=47eaff6918faa324009888738c05900c98b86e04;hb=372b9ad7acc40810bbcec6a796c71b54901b3ca7;hpb=95bc7fb90c36ee10dc171a23e8783eff30072b7b diff --git a/tests/test_perthreadlock.c b/tests/test_perthreadlock.c index 47eaff6..cfde1b6 100644 --- a/tests/test_perthreadlock.c +++ b/tests/test_perthreadlock.c @@ -200,7 +200,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(); @@ -221,7 +222,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); } @@ -232,7 +234,8 @@ void *thr_writer(void *data) long tidx; 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(); @@ -260,7 +263,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); } @@ -365,7 +369,7 @@ 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);