aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@us.ibm.com>2005-08-25 19:08:37 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 19:11:00 -0400
commitcf4ef01440ca5c6d96f2ea2b793a37a0a863a045 (patch)
tree53e017b2608442cb919595ad0cb6ed3a0108bbbf /include
parent57bf1451ac79640c5a0a4f31284c43539fac2903 (diff)
[LIST]: Add docbook header comments for hlist_add_{before,after}_rcu()
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/list.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index 9b9b0eec1e8a..e6ec59682274 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -634,6 +634,21 @@ static inline void hlist_add_after(struct hlist_node *n,
634 next->next->pprev = &next->next; 634 next->next->pprev = &next->next;
635} 635}
636 636
637/**
638 * hlist_add_before_rcu - adds the specified element to the specified hlist
639 * before the specified node while permitting racing traversals.
640 * @n: the new element to add to the hash list.
641 * @next: the existing element to add the new element before.
642 *
643 * The caller must take whatever precautions are necessary
644 * (such as holding appropriate locks) to avoid racing
645 * with another list-mutation primitive, such as hlist_add_head_rcu()
646 * or hlist_del_rcu(), running on this same list.
647 * However, it is perfectly legal to run concurrently with
648 * the _rcu list-traversal primitives, such as
649 * hlist_for_each_rcu(), used to prevent memory-consistency
650 * problems on Alpha CPUs.
651 */
637static inline void hlist_add_before_rcu(struct hlist_node *n, 652static inline void hlist_add_before_rcu(struct hlist_node *n,
638 struct hlist_node *next) 653 struct hlist_node *next)
639{ 654{
@@ -644,6 +659,21 @@ static inline void hlist_add_before_rcu(struct hlist_node *n,
644 *(n->pprev) = n; 659 *(n->pprev) = n;
645} 660}
646 661
662/**
663 * hlist_add_after_rcu - adds the specified element to the specified hlist
664 * after the specified node while permitting racing traversals.
665 * @prev: the existing element to add the new element after.
666 * @n: the new element to add to the hash list.
667 *
668 * The caller must take whatever precautions are necessary
669 * (such as holding appropriate locks) to avoid racing
670 * with another list-mutation primitive, such as hlist_add_head_rcu()
671 * or hlist_del_rcu(), running on this same list.
672 * However, it is perfectly legal to run concurrently with
673 * the _rcu list-traversal primitives, such as
674 * hlist_for_each_rcu(), used to prevent memory-consistency
675 * problems on Alpha CPUs.
676 */
647static inline void hlist_add_after_rcu(struct hlist_node *prev, 677static inline void hlist_add_after_rcu(struct hlist_node *prev,
648 struct hlist_node *n) 678 struct hlist_node *n)
649{ 679{