list_is_last(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… list_is_last(9) πŸ’…

okay so picture this: you're deep in the Kernel API Manual, right, and you just need to know ONE thing β€” is this entry, like, the last one in the list or not? that's it. that's the whole page. and honestly? iconic of it.


✨ NAME ✨

list_is_last β€” tests whether list is the last entry in list head πŸŽ€

like, straight up. it tests if list is the last entry in list head. no cap.


🌸 SYNOPSIS 🌸

int list_is_last (const struct list_head *list , const struct list_head *head );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • list β€” the entry to test πŸ‘€ (this is the one you're side-eyeing, asking "are you the last one bestie?")
  • head β€” the head of the list πŸ‘‘

πŸ’– SEE ALSO πŸ’–

first up, the receipts β€” this lives in the Kernel file ./tools/include/linux/list.h, and look at this absolute friend group of list functions:

like I said. whole squad. 🫢


lowkey the entire energy of this page is "one tiny question, answered." list_is_last doesn't do your taxes, it doesn't sort anything, it just tells you if you're at the end of the line. main character energy honestly πŸ’…

and that's a wrap, bestie! 🌈 this lil page is from ./tools/include/linux, dated October 2026 β€” so go forth, check your list tails, and slay βœ¨πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from