projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rculfqueue: Document dummy pointer value access
[urcu.git]
/
urcu
/
static
/
rculfqueue.h
diff --git
a/urcu/static/rculfqueue.h
b/urcu/static/rculfqueue.h
index 0970c0f3f0cf2fdfd1a1f31c936bac059d712804..6045c184d22b2b9af8ea0c03bb33a1f026d24be0 100644
(file)
--- a/
urcu/static/rculfqueue.h
+++ b/
urcu/static/rculfqueue.h
@@
-62,7
+62,7
@@
struct cds_lfq_node_rcu_dummy {
static inline
int is_dummy(struct cds_lfq_queue_rcu *q, struct cds_lfq_node_rcu *node)
{
static inline
int is_dummy(struct cds_lfq_queue_rcu *q, struct cds_lfq_node_rcu *node)
{
- return node ==
q->dummy
;
+ return node ==
CMM_LOAD_SHARED(q->dummy)
;
}
static inline
}
static inline
@@
-203,9
+203,13
@@
struct cds_lfq_node_rcu *_cds_lfq_dequeue_rcu(struct cds_lfq_queue_rcu *q)
/*
* We are the only thread
* allowed to update dummy (we
/*
* We are the only thread
* allowed to update dummy (we
- * own the old dummy).
+ * own the old dummy). Other
+ * dequeue threads read it
+ * concurrently with RCU
+ * read-lock held, which
+ * protects from ABA.
*/
*/
-
q->dummy = node
;
+
CMM_STORE_SHARED(q->dummy, node)
;
_cds_lfq_enqueue_rcu(q, node);
continue; /* try again */
}
_cds_lfq_enqueue_rcu(q, node);
continue; /* try again */
}
This page took
0.023008 seconds
and
4
git commands to generate.