list_add_tail_release(9)
π list_add_tail_release β it's a list_add_tail_release(9) moment, kernel API manual girlies rise π
okay so bestie, this is a kernel API page (that's the (9) section, iykyk) and it's genuinely short and sweet. Let's get into it. β¨
πΈ NAME πΈ
list_add_tail_release β add a new entry, but with a release barrier π¦ (yes the barrier is the whole point, not me being dramatic)
β SYNOPSIS β
void list_add_tail_release (struct list_head *new , struct list_head *head );
that's it. two pointers, no return value, void void void. clean. π
π«Ά ARGUMENTS π«Ά
newβ the new entry you're adding, bestie. she's the main character here πheadβ the list head you're adding it before π
π₯ DESCRIPTION π₯
okay so what this does: it inserts new before the specified head, and it uses a release barrier to set the ->next pointer that points to it. literally that's the whole vibe. β¨
and like, why do you care? because this is useful for implementing queues β specifically one that the elements are going to be walked through forwards locklessly π. so if you're doing lockless forward walking, this is your girl. no cap. π§
the barrier is doing real work here, don't sleep on it β it's the difference between "queue" and "chaos". π
π SEE ALSO π
Kernel file ./include/linux/list.h β and like, the entire list family reunion. everyone's here. bring snacks. π
- heads & init:
LIST_HEAD_INIT(9),LIST_HEAD(9),LIST_HEAD_GUARDED(9),INIT_LIST_HEAD(9) - adding stuff:
list_add(9),list_add_tail(9) - deleting / replacing:
list_del(9),list_replace(9),list_replace_init(9),list_swap(9),list_del_init(9),list_del_init_careful(9) - moving:
list_move(9),list_move_tail(9),list_bulk_move_tail(9) - is she� checks:
list_is_first(9),list_is_last(9),list_is_head(9),list_is_singular(9) - empty checks:
list_empty(9),list_empty_careful(9) - rotating:
list_rotate_left(9),list_rotate_to_front(9) - cutting / splicing:
list_cut_position(9),list_cut_before(9),list_splice(9),list_splice_tail(9),list_splice_init(9),list_splice_tail_init(9) - getting entries out:
list_entry(9),list_first_entry(9),list_last_entry(9),list_first_entry_or_null(9),list_first_entry_or_null_acquire(9),list_last_entry_or_null(9),list_next_entry(9),list_next_entry_circular(9),list_prev_entry(9),list_prev_entry_circular(9) - iteration nation:
list_for_each(9),list_for_each_continue(9),list_for_each_prev(9),list_for_each_safe(9),list_for_each_prev_safe(9),list_count_nodes(9),list_entry_is_head(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_from_reverse(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) - and the hlist girlies too:
hlist_unhashed(9),hlist_unhashed_lockless(9),hlist_empty(9),hlist_del(9),hlist_del_init(9),hlist_add_head(9),hlist_add_before(9),hlist_add_behind(9),hlist_add_fake(9),hlist_fake(9),hlist_is_singular_node(9),hlist_move_list(9),hlist_splice_init(9),hlist_for_each_entry(9),hlist_for_each_entry_continue(9),hlist_for_each_entry_from(9),hlist_for_each_entry_safe(9),hlist_count_nodes(9)
like, all of them. I'm not skipping a single one, that would be a crime fr fr. π
okay that's the whole page!! mwah π β this cutie came out of ./include/linux, dated October 2026, and she's filed under list_add_tail_release(9). go forth and locklessly walk your queues forwards, bestie. slay. π
β¨
π¦ 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