X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=tests%2Ftest_perthreadlock.c;h=86a34e2cecd6eb65157c235705936fd7ac6074e9;hb=2d72fae24ceebe2efa486b5bad421f39917ec0a6;hp=e8e616637d1b06a3783d2f75fe1d9df73d8b17fb;hpb=e3378d48162f484bb8bc94d77ce55d7d3ee018ed;p=urcu.git diff --git a/tests/test_perthreadlock.c b/tests/test_perthreadlock.c index e8e6166..86a34e2 100644 --- a/tests/test_perthreadlock.c +++ b/tests/test_perthreadlock.c @@ -199,7 +199,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(); @@ -220,7 +221,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); } @@ -231,7 +233,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(); @@ -259,7 +262,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); } @@ -364,7 +368,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);