projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor tests
[urcu.git]
/
tests
/
benchmark
/
test_urcu_lfs.c
diff --git
a/tests/benchmark/test_urcu_lfs.c
b/tests/benchmark/test_urcu_lfs.c
index 21015328828009fb450df465578f61af546fe013..1d2dc84b50dadce681d3e4da585889e4c06f5a44 100644
(file)
--- a/
tests/benchmark/test_urcu_lfs.c
+++ b/
tests/benchmark/test_urcu_lfs.c
@@
-50,6
+50,8
@@
#include <urcu.h>
#include <urcu/cds.h>
#include <urcu.h>
#include <urcu/cds.h>
+#define POISON_PTR ((void *) 0x42UL)
+
/*
* External synchronization used.
*/
/*
* External synchronization used.
*/
@@
-219,6
+221,7
@@
void do_test_pop(enum test_sync sync)
if (snode) {
struct test *node;
if (snode) {
struct test *node;
+ snode->next = POISON_PTR;
node = caa_container_of(snode,
struct test, list);
if (sync == TEST_SYNC_RCU)
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;
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);
node = caa_container_of(snode, struct test, list);
if (sync == TEST_SYNC_RCU)
call_rcu(&node->rcu, free_node_cb);
This page took
0.024595 seconds
and
4
git commands to generate.