seq_hlist_start_head_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– seq_hlist_start_head_rcu(9) πŸ’–

okay so you're reading the Kernel API Manual bestie, and this one is literally about kicking off an iteration of an hlist that's protected by RCU. yes THAT RCU. buckle up πŸŽ€


✨ NAME ✨

seq_hlist_start_head_rcu β€” start an iteration of a hlist protected by RCU πŸ¦‹


🌸 SYNOPSIS 🌸

struct hlist_node * seq_hlist_start_head_rcu (struct hlist_head *head ,
loff_t pos );

like, that's the whole signature, no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • head β€” the head of the hlist, aka where the whole thing begins πŸ‘‘
  • pos β€” the start position of the sequence, so you know where you're jumping in πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

so this one gets called at seq_file->op->start, periodt. and the vibe check is: call this function if you want to print a header at the top of the output. that's the whole reason it's the head version, iykyk 🌈

this list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives such as hlist_add_head_rcu β€” like, it's genuinely fine β€” as long as the traversal is guarded by rcu_read_lock. do not skip the guard, bestie, that's the whole contract πŸ˜­πŸ”’


🫢 SEE ALSO 🫢

the kernel file ./fs/seq_file.c has the whole fam:

like an entire friend group, obsessed πŸ’€πŸ’–


and that's the page!! this one lives in ./fs and it's dated October 2026, so screenshot it for the group chat before it's vintage 🧚⭐ bye bestie, go guard your traversal with rcu_read_lock πŸ’…πŸ¦‹

πŸ“¦ where this page comes from