hlist_for_each_entry_rcu_bh(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ hlist_for_each_entry_rcu_bh ✨

Okay bestie, so this one's a kernel API manual page (hlist_for_each_entry_rcu_bh, section 9) and honestly it's giving niche but powerful πŸ¦‹. If you've ever needed to loop over an RCU-protected hlist without everything falling apart, this is your girl.


πŸ’– NAME πŸ’–

hlist_for_each_entry_rcu_bh β€” literally just iterate over an rcu list of given type πŸ’…

🌸 SYNOPSIS 🌸

hlist_for_each_entry_rcu_bh (pos , head , member );

πŸŽ€ ARGUMENTS πŸŽ€

  • pos β€” the type * you're using as your loop cursor. main character energy fr, she's the one moving through the list ✨
  • head β€” the head of your list, the starting point, the VIP entrance 🫢
  • member β€” the name of the hlist_node inside the struct. iykyk, it's how we get from the node back to the thing πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

So this list-traversal primitive can safely run concurrently with the _rcu list-mutation primitives β€” stuff like hlist_add_head_rcu β€” as long as the traversal is guarded by rcu_read_lock. No cap. That's the whole vibe check: guard it with rcu_read_lock and you're slaying, skip the guard and it's giving undefined chaos 😭

⚠️ Bestie please remember: the safety here is conditional. rcu_read_lock is not optional, it's the whole point πŸ™ˆ

⭐ SEE ALSO ⭐

All the siblings and cousins, in the kernel file ./include/linux/rculist.h β€” obsessed with how many of these there are πŸ’œ


πŸ’–βœ¨ and that's the page!! βœ¨πŸ’–

This little icon lives in ./include/linux and the page is dated October 2026 β€” so yeah, cry about it, the kernel docs are from the future πŸ•°οΈπŸ‘‘. Catch you in the next manpage, bestie, mwah πŸŽ€πŸ’‹

πŸ“¦ where this page comes from