X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Fbenchmark%2Ftest_urcu_lfs.c;h=9670ae557af206e0b3da51d1a9b35981f4c67065;hp=21015328828009fb450df465578f61af546fe013;hb=2af1c19e6a553878fcb2a5106f050d5ed7ac0f54;hpb=4b665350f555d17d5ad84b8f63bf9acbdf0b634d diff --git a/tests/benchmark/test_urcu_lfs.c b/tests/benchmark/test_urcu_lfs.c index 2101532..9670ae5 100644 --- a/tests/benchmark/test_urcu_lfs.c +++ b/tests/benchmark/test_urcu_lfs.c @@ -50,6 +50,8 @@ #include #include +#define POISON_PTR ((void *) 0x42UL) + /* * External synchronization used. */ @@ -219,6 +221,7 @@ void do_test_pop(enum test_sync sync) if (snode) { struct test *node; + snode->next = POISON_PTR; node = caa_container_of(snode, struct test, list); if (sync == TEST_SYNC_RCU) @@ -241,6 +244,7 @@ void do_test_pop_all(enum test_sync sync) cds_lfs_for_each_safe(head, snode, n) { struct test *node; + snode->next = POISON_PTR; node = caa_container_of(snode, struct test, list); if (sync == TEST_SYNC_RCU) call_rcu(&node->rcu, free_node_cb); @@ -512,6 +516,7 @@ int main(int argc, char **argv) tot_successful_dequeues + end_dequeues); free_all_cpu_call_rcu_data(); + cds_lfs_destroy(&s); free(count_enqueuer); free(count_dequeuer); free(tid_enqueuer);