list_del_range(9)
π list_del_range(9) β Kernel API Manual, bestie edition π
okay so picture this: you're deep in list_del_range(9) from the Kernel API Manual and you just need someone to explain it like a friend, not a brick wall. that's me, i'm that friend β¨
β¨ NAME β¨
list_del_range β deletes a whole range of entries from a list. like, a bunch of them at once, not just one. π
π¦ SYNOPSIS π¦
void list_del_range (struct list_head *begin , struct list_head *end );
πΈ ARGUMENTS πΈ
beginβ the first element in the range you're deleting from the list. the opening act π¬endβ the last element in the range you're deleting from the list. the finale, periodt π
π NOTE π
ok genuinely important, bestie, do not skip this one: list_empty on the range of entries does not return true after this. the entries are in an undefined state. undefined!! like, do not touch, do not poke, do not look at them expecting answers π that's the whole vibe of this note and it's not a cute one.
π§ SEE ALSO π§
so like. the extended universe. the whole friend group π
- Kernel file
./tools/include/linux/list.h 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_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_for_each_from(9)
ok that's the whole thing, no gatekeeping, you now know more about linked-list range deletion than most people at the function π«Ά
sign-off time β¨ this page lives in./tools/include/linux, dated October 2026, and it's still out here servinglist_del_range(9)realness. 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