hlist_for_each_entry_rcu(9)
bestie π«Ά welcome to the Kernel API Manual page for hlist_for_each_entry_rcu(9) β itβs giving RCU list traversal, but make it cute π
β¨
πΈ NAME πΈ
hlist_for_each_entry_rcu is here to iterate over rcu list of given type β thatβs the whole assignment, periodt π
β¨ SYNOPSIS β¨
the signature is literally one line of realness, so here it is exactly:
hlist_for_each_entry_rcu (pos , head , member , cond... );
π ARGUMENTS π
okay so four arguments walk into the group chat β letβs meet them π«Ά
posβ thetype *to use as a loop cursor. main character pointer energy πheadβ the head for your list. literally the head of the whole operation πmemberβ the name of thehlist_nodewithin the struct. iykyk π¦condβ optional lockdep expression if called from non-RCU protection. optional but iconic β¨
π DESCRIPTION π
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 rcu_read_lock π₯
thatβs the vibe check: safe concurrency, but only with that guard in place. no cap π«Ά
π SEE ALSO π
the whole friend group is here β plus the kernel file ./include/linux/rculist.h π§
- Kernel file
./include/linux/rculist.h 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_srcu(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)
okay bestie thatβs the whole page π it lives at ./include/linux, dated October 2026, and the title is hlist_for_each_entry_rcu(9) β bye!! π
β¨
π¦ 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