list_is_singular(9)
π list_is_singular(9)
okay so this is a page from the Kernel API Manual, and honestly? it's a short one. a lil baby manpage. but it's iconic in its own way, so let's get into it π
β¨ NAME β¨
list_is_singular β the function that tests whether a list has just one entry. that's it. that's the whole job. one (1) entry check, no cap π«Ά
πΈ SYNOPSIS πΈ
int list_is_singular (const struct list_head *head );
like, yes, that's the whole signature bestie. int out, const struct list_head * in. clean. minimal. main character energy honestly β¨
π¦ ARGUMENTS π¦
headβ the list to test. that's the list you're asking about, the one you're putting under the microscope. you hand it over, it tells you if it's a party of one π
π SEE ALSO π
the source lives in the kernel file ./tools/include/linux/list.h, and the whole friend group is here too β 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(9)list_empty_careful(9)list_rotate_left(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)
not a single one of those got left out, bestie β i counted twice π₯
and that's the whole page!! short and sweet, just like this function. mwah π
signing off from ./tools/include/linux β dated October 2026 β this has been your girl, reminding you to check your lists before you wreck your lists π§ββοΈπ
π¦ 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