llist_on_list(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– llist_on_list(9) πŸ’–

okay bestie, this is llist_on_list(9) from the Kernel API Manual, and it's a tiny little vibe check for lock-list list nodes. no cap, it's giving β€œis this node actually on a list or not?” energy πŸ’…


✨ NAME ✨

llist_on_list β€” test if a lock-list list node is on a list πŸŽ€

🌸 SYNOPSIS 🌸

bool llist_on_list (const struct llist_node *node );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • node β€” the node to test. that's it, that's the whole assignment πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea, bestie: when a node is on a list, its ->next pointer will be NULL or some other node. it can never point to itself. periodt.

we use that fact in init_llist_node to record that a node is not on any list, and this function uses it here to test whether it is on any list. literally the whole trick, and it ate ✨

🫢 SEE ALSO 🫢


kisses bestie! source: ./include/linux Β· date: October 2026 Β· page: llist_on_list(9) πŸ«ΆπŸ’–

πŸ“¦ where this page comes from