list_empty(9)
π list_empty(9) β the Kernel API Manual glow-up β¨
okay so bestie, welcome to list_empty, page 9 of the Kernel API Manual. Yes, the whole manual name goes in here because we're being proper for like two seconds. π
πΈ NAME πΈ
list_empty β the little function that tests whether a list is empty π«Ά
β SYNOPSIS β
int list_empty (const struct list_head *head );
that's it. that's the whole signature. no cap, it's giving minimalism π
π¦ ARGUMENTS π¦
headβ the list to test π literally just hand it the list and it'll do the vibe check for you. it's aconst struct list_head *, so it's not out here mutating anything, she's just looking πβ¨
π₯ SEE ALSO π₯
okay so this is the part where the manpage flexes its entire friend group and honestly? iconic. the whole squad lives in the kernel file ./tools/include/linux/list.h β go say hi to all of them π§πΈ
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_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_prepare_entry(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)
like, forty-four whole entries. she knows everyone. main character energy fr fr ππ
π reminder bestie: this page tells you whatlist_emptyis and what to pass it. the manpage keeps it cute and short β it does not spell out the return-value convention here, so don't go inventing one. check the source in./tools/include/linux/list.hif you need the deets. iykyk π
πΈ that's the whole page! brought to you by source/version ./tools/include/linux, dated October 2026, and stamped list_empty(9) β slay, go check your lists, 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