list_entry_is_head(9)
π 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β thetype *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 thelist_headwithin the struct πΈ β you know how these kernel list macros are always like "which field inside your struct is thelist_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
- 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