hlist_nulls_...ch_entry_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ hlist_nulls_...ch_entry_rcu(9) ✨

Okay so bestie, welcome to the Kernel API Manual πŸŽ€ β€” today we're looking at this icon of a macro, hlist_nulls_for_each_entry_rcu. Yes, the header truncated it, no, that's not a vibe, just how it is. πŸ’…


🌸 NAME 🌸

hlist_nulls_for_each_entry_rcu β€” iterate over rcu list of given type πŸ¦‹


⭐ SYNOPSIS ⭐

hlist_nulls_for_each_entry_rcu (tpos , pos , head , member );

She's giving "four things, in that order, don't @ me" πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • tpos β€” the *type ** you're gonna use as a loop cursor πŸŒ€ like, that's your main character pointer, fr fr.
  • pos β€” the struct hlist_nulls_node you use as a loop cursor. yes bestie, there are two cursors, they're both doing their job.
  • head β€” the head of the list 🌈 the literal start of everything.
  • member β€” the name of the hlist_nulls_node inside the struct. you're telling it where to find the node, iykyk 🐝

πŸ”₯ DESCRIPTION πŸ”₯

So here's the tea β˜• β€” the barrier in there is needed to make sure the compiler doesn't cache the first element [1], because this loop can be restarted [2]. lowkey crucial, ngl. πŸ’€

  • [1] Documentation/memory-barriers.txt around line 1533
  • [2] Documentation/RCU/rculist_nulls.rst around line 146

Go read those two, they ate. πŸ“šβœ¨


🫢 SEE ALSO 🫢

Kernel file ./include/linux/rculist_nulls.h β€” and her whole extended friend group, no cap:


🌷 okay that's the whole page, bestie 🌷 β€” brought to you by ./include/linux, dropping October 2026, filed under hlist_nulls_...ch_entry_rcu(9). mwah πŸ’‹ periodt. πŸ’œ

πŸ“¦ where this page comes from