list_prepare_entry(9)
β¨ list_prepare_entry(9) β¨
ok so bestie, this is a page from the Kernel API Manual (list_prepare_entry(9), section 9) and honestly? it's a little one, but she's important. she's the setup girl. the pre-game. the "get your pos in order before the real loop starts" moment π
π NAME π
list_prepare_entry β literally prepares a pos entry so you can hand it to list_for_each_entry_continue(). that's it, that's the whole job. she's a supporting character with main character energy π«Ά
πΈ SYNOPSIS πΈ
list_prepare_entry (pos , head , member );
π ARGUMENTS π
posβ thetype *you're using as your start point. like, the entry you wanna kick things off from β¨headβ the head of the list. the mother ship. the beginning of everything πmemberβ the name of thelist_headinside the struct. iykyk, it's the little list node hiding inside your big struct π¦
π§ DESCRIPTION π§
so what she does is: she prepares a pos entry so it's all ready to be used as a start point in list_for_each_entry_continue. that's the entire vibe. no cap, no extra steps, no surprises π
think of it as the "ok you're up, go" tap on the shoulder before the loop does its thing π
ngl, this is one of those tiny helpers where if you skip it, the macro will Not Be Happy with you π so likeβ¦ don't skip it. fr fr.
π SEE ALSO π
Kernel file ./tools/include/linux/list.h
and now, the full squad β every single one, because we don't do "etc." around here:
list_add(9)list_add_tail(9)list_replace(9)list_del_init(9)list_move(9)list_move_tail(9)list_is_first(9)list_is_last(9)list_empty(9)list_empty_careful(9)list_rotate_left(9)list_is_singular(9)list_cut_position(9)list_splice(9)list_splice_tail(9)list_splice_init(9)list_splice_tail_init(9)list_entry(9)list_first_entry(9)list_last_entry(9)list_first_entry_or_null(9)list_last_entry_or_null(9)list_next_entry(9)list_prev_entry(9)list_for_each(9)list_for_each_prev(9)list_for_each_safe(9)list_for_each_prev_safe(9)list_for_each_entry(9)list_for_each_entry_reverse(9)list_for_each_entry_continue(9)list_for_each_entry_continue_reverse(9)list_for_each_entry_from(9)list_for_each_entry_safe(9)list_for_each_entry_safe_continue(9)list_for_each_entry_safe_from(9)list_for_each_entry_safe_reverse(9)list_safe_reset_next(9)hlist_for_each_entry(9)hlist_for_each_entry_continue(9)hlist_for_each_entry_from(9)hlist_for_each_entry_safe(9)list_del_range(9)list_for_each_from(9)
ok and that's the whole page, bestie π she lives down in ./tools/include/linux, she's dated October 2026, and she ate. periodt π₯π
~ mwah, go prep that pos ~ π
π¦ 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