list_is_head(9)
π list_is_head(9) π
ok so we're in the Kernel API Manual bestie, and today's main character is list_is_head β a tiny little icon that answers exactly one question: is @list literally the head of @head's list? that's it. that's the whole vibe. π
β¨ NAME β¨
list_is_head β tests whether @list is the list @head π«Ά
πΈ SYNOPSIS πΈ
int list_is_head (const struct list_head *list , const struct list_head
*head );
like yes she's just one function call, no cap. π
π¦ ARGUMENTS π¦
listβ the entry to test π like the one you're side-eyeingheadβ the head of the list π
so you hand her the entry and the head and she's like "hmm, is this THE head?" and gets back at you with an int. periodt. π₯
π SEE ALSO π
all her besties live in the Kernel file ./scripts/include/list.h β go say hi:
container_of(9)INIT_LIST_HEAD(9)list_add(9)list_add_tail(9)list_del(9)list_replace(9)list_replace_init(9)list_move(9)list_move_tail(9)list_is_first(9)list_is_last(9)list_empty(9)list_entry(9)list_first_entry(9)list_last_entry(9)list_next_entry(9)list_prev_entry(9)list_entry_is_head(9)list_for_each_entry(9)list_for_each_entry_reverse(9)list_for_each_entry_safe(9)hlist_unhashed(9)hlist_del(9)hlist_del_init(9)hlist_add_head(9)hlist_for_each_entry(9)hlist_for_each_entry_safe(9)
and that's the whole page, bestie β short and slay, just how we like her. π
ok final lil sign-off because i'm obsessed with sourcing my info: this one comes from ./scripts/include and it's dated October 2026. manifesting that energy for u. π§ββοΈβ¨πΈ
π¦ 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