list_for_eac...continue_rcu(9)
π« list_for_eac...continue_rcu(9) β the kernel API manual, bestie edition
Okay so picture this: it's a kernel API manual page, the title got abbreviated by the terminal like it always does, and the vibe is very RCU. Welcome to list_for_eac...continue_rcu(9) π¦ no cap, that truncated name is literally how it shows up, we don't fix it, we respect it.
β¨ SYNOPSIS β¨
list_for_each_entry_continue_rcu (pos , head , member );
Three args, one macro, endless iteration energy π
π ARGUMENTS π
posβ thetype *you're using as your loop cursor. She's the main character, she walks the list.headβ the head of your list. The starting point, the home base, the anchor π«Άmemberβ the name of thelist_headinside the struct. ykyk, the little connector field that makes the whole thing work.
πΈ DESCRIPTION πΈ
So here's the tea: this iterates over a list of the given type, continuing after the current position β and that current position must have been in the list at the time the RCU read lock was taken. Important!! β οΈ
Which typically means you need one of these two situations going on:
- You got the node from a previous walk of the list, in the same RCU read-side critical section β same lock, same section, no cheating π§
- Or you held some sort of non-RCU reference (like a reference count, bestie) to keep the node alive and in the list.
Yeah, both of those conditions matter β alive and still in the list. Not just alive. Not just linked. Both. π
And the comparison you've all been waiting for: this iterator is similar to list_for_each_entry_from_rcu, except this one starts after the given position, and that one starts at the given position. One is "next bestie," one is "current bestie." Don't mix them up, I'm begging π
π SEE ALSO π
Kernel file ./include/linux/rculist.h β and like, the entire extended RCU family reunion. Everyone showed up:
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_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_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)
That's the whole group chat, fr fr πβ¨
Anyway bestie, that's the page π β source path ./include/linux, dated October 2026, and she's filed under list_for_eac...continue_rcu(9) in the Kernel API Manual. Go forth and iterate responsibly, mwah π
π¦ 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