list_entry_is_head(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– list_entry_is_head β€” the "are we at the head rn?" check

okay bestie, welcome to the list_entry_is_head(9) page, straight out of the Kernel API Manual ✨ this one is a tiny little icon and honestly it's giving "small but mighty" πŸŽ€


🌸 NAME

list_entry_is_head β€” test if the entry points to the head of the list πŸ’…

like, that's literally the whole job. it checks whether the entry you're holding is pointing at the head of your list. that's it. that's the function. periodt 🫢


✨ SYNOPSIS

list_entry_is_head (pos , head , member );

yes, the spacing is exactly like that in the original, don't come for me 😭 β€” copy it as-is and you're golden ⭐


πŸ¦‹ ARGUMENTS

  • pos β€” the type * to cursor πŸ‘€ β€” this is your little cursor pointer, the thing you're checking on. it's the entry you're asking about, the main character of this vibe check 🌈
  • head β€” the head for your list πŸ’– β€” hand over the head of the list you care about and let the function do its thing. this is the reference point, the home base, the "where's the top of this list" answer πŸŽ€
  • member β€” the name of the list_head within the struct 🌸 β€” you know how these kernel list macros are always like "which field inside your struct is the list_head?" well, this is that. just pass the name of that field, no cap 🧚

πŸ‘‘ SEE ALSO

Kernel file ./scripts/include/list.h and the whole friend group:

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_is_head(9), list_empty(9), list_entry(9), list_first_entry(9), list_last_entry(9), list_next_entry(9), list_prev_entry(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) πŸ”₯

ngl that's a whole roster and every single one of them ate πŸ’… go read them if you want the full lore, iykyk πŸ’œ


ok that's the whole page bestie, it's short and sweet and it slays πŸ“

and finally, the cute little sign-off from the original footer: this page lives under ./scripts/include, and it's dated October 2026 🌸 thanks for reading, mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from