X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_ja.c;h=05725275cffaa0781e8bf8636c206e833b7db6bd;hb=5bcf8326b6e13ca93429925bc38fb81c73155c54;hp=22c336bd77a704cec5c9058d686ed93441dc5f06;hpb=b10c8ba83ff83cc8bed4bd62832020f9572e0e92;p=userspace-rcu.git diff --git a/tests/test_urcu_ja.c b/tests/test_urcu_ja.c index 22c336b..0572527 100644 --- a/tests/test_urcu_ja.c +++ b/tests/test_urcu_ja.c @@ -850,8 +850,8 @@ void *test_ja_rw_thr_reader(void *_count) struct cds_ja_node *ja_node; uint64_t key; - 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()); URCU_TLS(rand_lookup) = urcu_get_thread_id() ^ time(NULL); @@ -894,8 +894,8 @@ void *test_ja_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("thread_end %s, tid %lu\n", + "reader", urcu_get_thread_id()); printf_verbose("readid : %lx, lookupfail %lu, lookupok %lu\n", pthread_self(), URCU_TLS(lookup_fail), URCU_TLS(lookup_ok)); @@ -915,8 +915,8 @@ void *test_ja_rw_thr_writer(void *_count) uint64_t key; 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()); URCU_TLS(rand_lookup) = urcu_get_thread_id() ^ time(NULL); @@ -1000,8 +1000,8 @@ void *test_ja_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("thread_end %s, tid %lu\n", + "writer", urcu_get_thread_id()); 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), @@ -1294,8 +1294,8 @@ int main(int argc, char **argv) printf_verbose("Validating lookups.\n"); if (leak_detection) printf_verbose("Memory leak dection activated.\n"); - printf_verbose("thread %-6s, thread id : %lx, tid %lu\n", - "main", pthread_self(), (unsigned long)gettid()); + printf_verbose("thread %-6s, tid %lu\n", + "main", urcu_get_thread_id()); memset(&act, 0, sizeof(act)); ret = sigemptyset(&act.sa_mask);