list_splice_init(9)
π list_splice_init(9) β or, the Kernel API Manual's guide to stealing a whole list and giving it a fresh start β¨
okay bestie, welcome to the group chat, this is list_splice_init from the Kernel API Manual and honestly? she's a little sleeper hit π
πΈ NAME πΈ
list_splice_init β the way she joins two lists together and reinitialises the now-emptied one. two jobs, one function, main character energy fr fr π
β¨ SYNOPSIS β¨
void list_splice_init (struct list_head *list , struct list_head *head
);
that's it. that's the whole signature. no return value, she just does things π
π¦ ARGUMENTS π¦
listβ the new list you're adding. the fresh content, the one being brought over π§headβ the place to add it in the first list. the destination, the host, the venue π
π DESCRIPTION π
The list at list is reinitialised.
no like seriously, that's the whole thing. she splices your list into head and then reinitialises list so you're left with a clean, empty, ready-to-go list instead of a dangling mess. iconic behaviour tbh. ate and left no crumbs π
π SEE ALSO π
the extended universe, no cap. this is the whole squad and you're gonna want to know all of them π
list_add(9)list_add_tail(9)list_replace(9)list_del_init(9)list_move(9)list_move_tail(9)list_is_first(9)list_is_last(9)list_empty(9)list_empty_careful(9)list_rotate_left(9)list_is_singular(9)list_cut_position(9)list_splice(9)list_splice_tail(9)list_splice_tail_init(9)list_entry(9)list_first_entry(9)list_last_entry(9)list_first_entry_or_null(9)list_last_entry_or_null(9)list_next_entry(9)list_prev_entry(9)list_for_each(9)list_for_each_prev(9)list_for_each_safe(9)list_for_each_prev_safe(9)list_for_each_entry(9)list_for_each_entry_reverse(9)list_prepare_entry(9)list_for_each_entry_continue(9)list_for_each_entry_continue_reverse(9)list_for_each_entry_from(9)list_for_each_entry_safe(9)list_for_each_entry_safe_continue(9)list_for_each_entry_safe_from(9)list_for_each_entry_safe_reverse(9)list_safe_reset_next(9)hlist_for_each_entry(9)hlist_for_each_entry_continue(9)hlist_for_each_entry_from(9)hlist_for_each_entry_safe(9)list_del_range(9)list_for_each_from(9)
and don't forget the actual kernel file she lives in: ./tools/include/linux/list.h π«Ά
anyway bestie that's the tea β this page came from ./tools/include/linux, dated October 2026, and yes she's still serving list_splice_init(9) realness. 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