hlist_for_each_entry_srcu(9)
π
hlist_for_each_entry_srcu(9) π
okay bestie, welcome to the Kernel API Manual page for hlist_for_each_entry_srcu(9) β literally the move for iterating over an rcu list of a given type. no cap. β¨
πΈ NAME πΈ
hlist_for_each_entry_srcu β iterate over rcu list of given type
β¨ SYNOPSIS β¨
hlist_for_each_entry_srcu (pos , head , member , cond );
π ARGUMENTS π
posβ thetype *to use as a loop cursor. main-character pointer energy, fr.headβ the head for your list. yes bestie, the actual head.memberβ the name of thehlist_nodewithin the struct.condβ lockdep expression for the lock required to traverse the list. it's giving safety vibe check.
π¦ DESCRIPTION π¦
okay so here's the tea: this list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives such as hlist_add_head_rcu as long as the traversal is guarded by srcu_read_lock. that's the whole vibe. and the lockdep expression srcu_read_lock_held can be passed as the cond argument from the read side. slay. π
π SEE ALSO π
Kernel file ./include/linux/rculist.h β the whole squad:
list_for_each_rcu(9)list_tail_rcu(9)list_add_rcu(9)list_add_tail_rcu(9)list_del_rcu(9)list_bidir_del_rcu(9)hlist_del_init_rcu(9)list_replace_rcu(9)list_splice_rcu(9)__list_splice_init_rcu(9)list_splice_init_rcu(9)list_splice_tail_init_rcu(9)list_entry_rcu(9)list_first_or_null_rcu(9)list_next_or_null_rcu(9)list_for_each_entry_rcu(9)list_for_each_entry_srcu(9)list_entry_lockless(9)list_for_each_entry_lockless(9)list_for_each_entry_continue_rcu(9)list_for_each_entry_from_rcu(9)hlist_del_rcu(9)hlist_replace_rcu(9)hlists_swap_heads_rcu(9)hlist_add_head_rcu(9)hlist_add_tail_rcu(9)hlist_add_before_rcu(9)hlist_add_behind_rcu(9)hlist_for_each_entry_rcu(9)hlist_for_each_entry_rcu_notrace(9)hlist_for_each_entry_rcu_bh(9)hlist_for_each_entry_continue_rcu(9)hlist_for_each_entry_continue_rcu_bh(9)hlist_for_each_entry_from_rcu(9)
this cutie comes from ./include/linux, dated October 2026, and it's the hlist_for_each_entry_srcu(9) page. bye bestie, go iterate safely πβ¨π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms