__list_splice_init_rcu(9)
π __list_splice_init_rcu (9) β the Kernel API Manual, bestie edition π
okay so welcome to the glow-up of __list_splice_init_rcu(9), straight out of the Kernel API Manual. she joins an RCU-protected list into an existing list and honestly? she ate. β¨
πΈ NAME πΈ
__list_splice_init_rcu β join an RCU-protected list into an existing list. that's it, that's the whole personality π«Ά
β SYNOPSIS β
void __list_splice_init_rcu (struct list_head *list , struct list_head *prev , struct list_head *next , void (*sync)(void) );
four arguments, one void return, zero notes. we love a low-maintenance signature π
π¦ ARGUMENTS π¦
listβ the RCU-protected list to splice. this is the little guy getting merged in π₯Ίprevβ points to the last element of the existing list. yes, the last one, don't get it twisted πnextβ points to the first element of the existing listsyncβsynchronize_rcu,synchronize_rcu_expedited, ... (the...is doing so much work here, iykyk)
π₯ DESCRIPTION π₯
so the list that prev and next point at? it can be RCU-read traversed concurrently with this function running. no cap, that's the whole point of the RCU flavor. β¨
heads up: this function blocks. like, actually blocks. plan your little life around it π
important note, and girl i mean IMPORTANT: the caller has to take whatever action is necessary to prevent any other updates to the existing list. that's on you, not on her. π
in principle, it's possible to modify the list as soon as sync begins execution. so like, the door cracks open the moment sync starts doing its thing π
if this sort of thing becomes necessary, an alternative version based on call_rcu could be created. but like β only if -really- needed. there is literally no shortage of RCU API members, bestie, the RCU shelf is fully stocked ππ
π SEE ALSO π
Kernel file ./include/linux/rculist.h, plus the whole extended fam β every single one of them, no skipping, we're doing the full group chat:
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_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_continue_rcu(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)
okay that's the whole page, go be safe with your list updates π
mwah π from ./include/linux, dated October 2026 β that's the source and the date, bestie, and yes i remembered them both πβ¨
π¦ 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