projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test_urcu_lfs: test for the proper pointer
[urcu.git]
/
tests
/
test_urcu_lfs.c
diff --git
a/tests/test_urcu_lfs.c
b/tests/test_urcu_lfs.c
index 5886ce86de50c1ab2c25c61a172d895fa4a33a53..99d1b4c9dfb426179b81e6c371623541f018c445 100644
(file)
--- a/
tests/test_urcu_lfs.c
+++ b/
tests/test_urcu_lfs.c
@@
-242,13
+242,14
@@
void *thr_dequeuer(void *_count)
for (;;) {
struct cds_lfs_node_rcu *snode;
for (;;) {
struct cds_lfs_node_rcu *snode;
- struct test *node;
rcu_read_lock();
snode = cds_lfs_pop_rcu(&s);
rcu_read_lock();
snode = cds_lfs_pop_rcu(&s);
- node = caa_container_of(snode, struct test, list);
rcu_read_unlock();
rcu_read_unlock();
- if (node) {
+ if (snode) {
+ struct test *node;
+
+ node = caa_container_of(snode, struct test, list);
call_rcu(&node->rcu, free_node_cb);
URCU_TLS(nr_successful_dequeues)++;
}
call_rcu(&node->rcu, free_node_cb);
URCU_TLS(nr_successful_dequeues)++;
}
This page took
0.022723 seconds
and
4
git commands to generate.