hlist_for_each_entry_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 β€” the type * 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 the hlist_node within 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 🧚


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