llist_del_first_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… llist_del_first_init β€” a love letter to lock-less lists

okay so this is a page from the Kernel API Manual, section 9, and the star of the show is llist_del_first_init. she pops the first entry off a lock-less list and leaves it looking fresh and unlisted. bestie, it's giving "delete but make it clean" ✨


✨ SYNOPSIS ✨

struct llist_node * llist_del_first_init (struct llist_head *head );

that's it. that's the whole vibe. πŸŽ€


🌸 ARGUMENTS 🌸

  • head β€” the head of the lock-less list you wanna delete from. your main character pointer, basically. πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function behaves the same as llist_del_first, except β€” and this is the iconic part β€” llist_init_node gets called on the returned node. the way that works means llist_on_list will report false for that node. literally off the list. not on it. marked as being off-list. slay. πŸ’…

no cap, that's the entire difference. same deletion energy, but the node comes back already de-listed and ready to be reused without any "wait, am i still on a list?" confusion. 🧚


πŸ”₯ SEE ALSO πŸ”₯

everything in the same friend group, all from the kernel file ./include/linux/llist.h:

fr fr go read llist_on_list(9) next, it's the one that makes the whole "am i on the list or not" thing click 🫢

⭐ bye bestie ⭐

that's the whole page! πŸ’– this little gem lives over in ./include/linux and the version stamped on it is October 2026 β€” so yeah, future-dated and still iconic. mwah. πŸŒˆπŸ“

πŸ“¦ where this page comes from