list_splice_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 😭

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