lfstack: relax constraints on node re-use
[urcu.git] / tests / benchmark / test_urcu_lfs.c
index 21015328828009fb450df465578f61af546fe013..1d2dc84b50dadce681d3e4da585889e4c06f5a44 100644 (file)
@@ -50,6 +50,8 @@
 #include <urcu.h>
 #include <urcu/cds.h>
 
+#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);
This page took 0.022682 seconds and 4 git commands to generate.