projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rculist: identify stores to shared pointers
[userspace-rcu.git]
/
urcu
/
rculist.h
diff --git
a/urcu/rculist.h
b/urcu/rculist.h
index 3604a96d0619d082ef7c3c2d46a4cff421c04c2e..e67503d9431d5da5d68d8f0a888613b1cebe2395 100644
(file)
--- a/
urcu/rculist.h
+++ b/
urcu/rculist.h
@@
-33,11
+33,12
@@
*/
static inline void cds_list_add_rcu(struct cds_list_head *newp, struct cds_list_head *head)
{
*/
static inline void cds_list_add_rcu(struct cds_list_head *newp, struct cds_list_head *head)
{
- newp->next = head->next;
+ struct cds_list_head *first = head->next;
+
+ newp->next = first;
newp->prev = head;
newp->prev = head;
- cmm_smp_wmb();
- head->next->prev = newp;
- head->next = newp;
+ rcu_assign_pointer(head->next, newp);
+ first->prev = newp;
}
/* replace an old entry atomically.
}
/* replace an old entry atomically.
@@
-54,7
+55,7
@@
static inline void cds_list_replace_rcu(struct cds_list_head *old, struct cds_li
static inline void cds_list_del_rcu(struct cds_list_head *elem)
{
elem->next->prev = elem->prev;
static inline void cds_list_del_rcu(struct cds_list_head *elem)
{
elem->next->prev = elem->prev;
-
elem->prev->next = elem->next
;
+
CMM_STORE_SHARED(elem->prev->next, elem->next)
;
}
/*
}
/*
This page took
0.024717 seconds
and
4
git commands to generate.