list_splice_tail_init(9)
πΈ NAME πΈ
okay so picture this: list_splice_tail_init is the girl who joins two lists together and then reinitialises the emptied list like it's a fresh new era π
β that's literally the whole thing, no cap. It lives in the Kernel API Manual btw, so yeah, we're in kernel-land today bestie π§β¨
β¨ SYNOPSIS β¨
void list_splice_tail_init (struct list_head *list , struct list_head *head );
like, that's it. that's the whole signature. she's short, she's sweet, she returns nothing (void queen π), and she takes two pointers to struct list_head. iconic behaviour fr fr.
π ARGUMENTS π
listβ the new list to add. this is the one that's gonna get moved and then reinitialised, so she's the main character of this operation π¦headβ the place to add it in the first list. this is the destination vibes, the spot where the new list gets tucked in π
π« DESCRIPTION π«
okay so listen, here's the lore: each of the lists is a queue. like, both of them. queues. that's the mental model, keep it in your head π§ β¨
and the list at list gets reinitialised β meaning after the splice happens, that list is reset to a clean little empty state. the way that she empties herself out and starts fresh?? self-care honestly πΈ
π₯ SEE ALSO π₯
she does not exist in a vacuum bestie, she's got a whole friend group. it's all hanging out in the kernel file ./tools/include/linux/list.h β go say hi π
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_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)
like, look at that roster π the whole linked-list friend group showed up for her. no gatekeeping here π«Ά
ngl bestie, don't skip the reinitialise part. she really does reset list. that's the whole personality of this function π
and that's the page!! mwah π this one came from ./tools/include/linux, dated October 2026, and it's giving "kernel docs but make it cute" πβ go forth and splice responsibly, iykyk π§π
π¦ 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