projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test_urcu_lfq: test for the proper pointer
[userspace-rcu.git]
/
tests
/
test_urcu_lfq.c
diff --git
a/tests/test_urcu_lfq.c
b/tests/test_urcu_lfq.c
index 39e0351abb27672f5d6677e436ebaeebc88567b3..1bbaf3cfd504a2abd0ead6e724f2b514c079dff5 100644
(file)
--- a/
tests/test_urcu_lfq.c
+++ b/
tests/test_urcu_lfq.c
@@
-243,14
+243,15
@@
void *thr_dequeuer(void *_count)
for (;;) {
struct cds_lfq_node_rcu *qnode;
for (;;) {
struct cds_lfq_node_rcu *qnode;
- struct test *node;
rcu_read_lock();
qnode = cds_lfq_dequeue_rcu(&q);
rcu_read_lock();
qnode = cds_lfq_dequeue_rcu(&q);
- node = caa_container_of(qnode, struct test, list);
rcu_read_unlock();
rcu_read_unlock();
- if (node) {
+ if (qnode) {
+ struct test *node;
+
+ node = caa_container_of(qnode, 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.022546 seconds
and
4
git commands to generate.