Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[LIST]: Add docbook header comments for hlist_add_{before,after}_rcu()

Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Paul E. McKenney and committed by
David S. Miller
cf4ef014 57bf1451

+30
+30
include/linux/list.h
··· 634 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 + */ 637 652 static inline void hlist_add_before_rcu(struct hlist_node *n, 638 653 struct hlist_node *next) 639 654 { ··· 659 644 *(n->pprev) = n; 660 645 } 661 646 647 + /** 648 + * hlist_add_after_rcu - adds the specified element to the specified hlist 649 + * after the specified node while permitting racing traversals. 650 + * @prev: the existing element to add the new element after. 651 + * @n: the new element to add to the hash list. 652 + * 653 + * The caller must take whatever precautions are necessary 654 + * (such as holding appropriate locks) to avoid racing 655 + * with another list-mutation primitive, such as hlist_add_head_rcu() 656 + * or hlist_del_rcu(), running on this same list. 657 + * However, it is perfectly legal to run concurrently with 658 + * the _rcu list-traversal primitives, such as 659 + * hlist_for_each_rcu(), used to prevent memory-consistency 660 + * problems on Alpha CPUs. 661 + */ 662 662 static inline void hlist_add_after_rcu(struct hlist_node *prev, 663 663 struct hlist_node *n) 664 664 {