X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_hash_rw.c;h=48dc1a810c21f1ce921f2efc9d8da9c7c8a7a225;hb=17fb31883652e28774dbb148f7237382de3ab504;hp=3eb72924cd79a3d0651efbf7832198d9df8d1bb7;hpb=1de4df4b770e5e90440008becc5e14a15c75c6e0;p=urcu.git diff --git a/tests/test_urcu_hash_rw.c b/tests/test_urcu_hash_rw.c index 3eb7292..48dc1a8 100644 --- a/tests/test_urcu_hash_rw.c +++ b/tests/test_urcu_hash_rw.c @@ -65,8 +65,8 @@ void *test_hash_rw_thr_reader(void *_count) struct lfht_test_node *node; struct cds_lfht_iter iter; - printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n", - "reader", pthread_self(), (unsigned long)gettid()); + printf_verbose("thread_begin %s, tid %lu\n", + "reader", urcu_get_thread_id()); set_affinity(); @@ -106,10 +106,11 @@ void *test_hash_rw_thr_reader(void *_count) rcu_unregister_thread(); *count = URCU_TLS(nr_reads); - printf_verbose("thread_end %s, thread id : %lx, tid %lu\n", - "reader", pthread_self(), (unsigned long)gettid()); - printf_verbose("readid : %lx, lookupfail %lu, lookupok %lu\n", - pthread_self(), URCU_TLS(lookup_fail), + printf_verbose("thread_end %s, tid %lu\n", + "reader", urcu_get_thread_id()); + printf_verbose("read tid : %lx, lookupfail %lu, lookupok %lu\n", + urcu_get_thread_id(), + URCU_TLS(lookup_fail), URCU_TLS(lookup_ok)); return ((void*)1); @@ -123,8 +124,8 @@ void *test_hash_rw_thr_writer(void *_count) struct wr_count *count = _count; int ret; - printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n", - "writer", pthread_self(), (unsigned long)gettid()); + printf_verbose("thread_begin %s, tid %lu\n", + "writer", urcu_get_thread_id()); set_affinity(); @@ -208,11 +209,13 @@ void *test_hash_rw_thr_writer(void *_count) rcu_unregister_thread(); - printf_verbose("thread_end %s, thread id : %lx, tid %lu\n", - "writer", pthread_self(), (unsigned long)gettid()); - printf_verbose("info id %lx: nr_add %lu, nr_addexist %lu, nr_del %lu, " - "nr_delnoent %lu\n", pthread_self(), URCU_TLS(nr_add), - URCU_TLS(nr_addexist), URCU_TLS(nr_del), + printf_verbose("thread_end %s, tid %lu\n", + "writer", urcu_get_thread_id()); + printf_verbose("info tid %lu: nr_add %lu, nr_addexist %lu, nr_del %lu, " + "nr_delnoent %lu\n", urcu_get_thread_id(), + URCU_TLS(nr_add), + URCU_TLS(nr_addexist), + URCU_TLS(nr_del), URCU_TLS(nr_delnoent)); count->update_ops = URCU_TLS(nr_writes); count->add = URCU_TLS(nr_add);