llist_on_list(9)
π 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 π«Ά
- Kernel file
./include/linux/llist.h init_llist_head(9)init_llist_node(9)llist_entry(9)member_address_is_nonnull(9)llist_for_each(9)llist_for_each_safe(9)llist_for_each_entry(9)llist_for_each_entry_safe(9)llist_empty(9)llist_add_batch(9)llist_add(9)llist_del_all(9)llist_del_first_init(9)
kisses bestie! source: ./include/linux Β· date: October 2026 Β· page: llist_on_list(9) π«Άπ
π¦ 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