projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add cmm_emit_legacy_smp_mb()
[userspace-rcu.git]
/
include
/
urcu
/
static
/
rculfstack.h
diff --git
a/include/urcu/static/rculfstack.h
b/include/urcu/static/rculfstack.h
index 5bb06b1a366142e1552ea6be01e691a07009862f..b44b9e29fdbad9b73024d653fb992218f221644b 100644
(file)
--- a/
include/urcu/static/rculfstack.h
+++ b/
include/urcu/static/rculfstack.h
@@
-69,7
+69,9
@@
int _cds_lfs_push_rcu(struct cds_lfs_stack_rcu *s,
* uatomic_cmpxchg() implicit memory barrier orders earlier
* stores to node before publication.
*/
* uatomic_cmpxchg() implicit memory barrier orders earlier
* stores to node before publication.
*/
- head = uatomic_cmpxchg(&s->head, old_head, node);
+ cmm_emit_legacy_smp_mb();
+ head = uatomic_cmpxchg_mo(&s->head, old_head, node,
+ CMM_SEQ_CST, CMM_SEQ_CST);
if (old_head == head)
break;
}
if (old_head == head)
break;
}
@@
-94,7
+96,9
@@
_cds_lfs_pop_rcu(struct cds_lfs_stack_rcu *s)
if (head) {
struct cds_lfs_node_rcu *next = rcu_dereference(head->next);
if (head) {
struct cds_lfs_node_rcu *next = rcu_dereference(head->next);
- if (uatomic_cmpxchg(&s->head, head, next) == head) {
+ if (uatomic_cmpxchg_mo(&s->head, head, next,
+ CMM_SEQ_CST, CMM_SEQ_CST) == head) {
+ cmm_emit_legacy_smp_mb();
return head;
} else {
/* Concurrent modification. Retry. */
return head;
} else {
/* Concurrent modification. Retry. */
This page took
0.025192 seconds
and
4
git commands to generate.