list_bidir_del_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to the list_bidir_del_rcu(9) page from the Kernel API Manual πŸ’– the name is literally: list_bidir_del_rcu - deletes entry from list without re-initialization. That's the whole vibe: delete it from the list, but do not re-initialize it. periodt. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

void list_bidir_del_rcu (struct list_head *entry );

πŸŽ€ ARGUMENTS πŸŽ€

  • entry β€” the element to delete from the list. That's your only argument, bestie. 🫢

πŸ’… DESCRIPTION πŸ’…

In contrast to list_del_rcu, this does not poison the prev pointer 😭 which is exactly what allows backwards traversal via list_bidir_prev_rcu. It's giving "keep the back lane open" energy, lowkey iconic. πŸ¦‹

⭐ NOTE ⭐

list_empty on entry does not return true after this, because the entry is in a special undefined state that permits RCU-based lockfree reverse traversal. In particular, this means we can not poison the forward and backwards pointers that may still be used for walking the list. πŸ’€

The caller must take whatever precautions are necessary (such as holding appropriate locks) to avoid racing with another list-mutation primitive, such as list_bidir_del_rcu or list_add_rcu, running on this same list. However, it is perfectly legal to run concurrently with the _rcu list-traversal primitives, such as list_for_each_entry_rcu. ✨

Note that list_del_rcu and list_bidir_del_rcu must not be used on the same list. 🚨
Note that the caller is not permitted to immediately free the newly deleted entry. Instead, either synchronize_rcu or call_rcu must be used to defer freeing until an RCU grace period has elapsed. ⏳

🌈 SEE ALSO 🌈

Kernel file ./include/linux/rculist.h, and the whole iconic crew: list_for_each_rcu(9), list_tail_rcu(9), list_add_rcu(9), list_add_tail_rcu(9), list_del_rcu(9), hlist_del_init_rcu(9), list_replace_rcu(9), list_splice_rcu(9), __list_splice_init_rcu(9), list_splice_init_rcu(9), list_splice_tail_init_rcu(9), list_entry_rcu(9), list_first_or_null_rcu(9), list_next_or_null_rcu(9), list_for_each_entry_rcu(9), list_for_each_entry_srcu(9), list_entry_lockless(9), list_for_each_entry_lockless(9), list_for_each_entry_continue_rcu(9), list_for_each_entry_from_rcu(9), hlist_del_rcu(9), hlist_replace_rcu(9), hlists_swap_heads_rcu(9), hlist_add_head_rcu(9), hlist_add_tail_rcu(9), hlist_add_before_rcu(9), hlist_add_behind_rcu(9), hlist_for_each_entry_rcu(9), hlist_for_each_entry_srcu(9), hlist_for_each_entry_rcu_notrace(9), hlist_for_each_entry_rcu_bh(9), hlist_for_each_entry_continue_rcu(9), hlist_for_each_entry_continue_rcu_bh(9), hlist_for_each_entry_from_rcu(9).


okay bestie, that's the whole page πŸ’– source/version: ./include/linux πŸŽ€ date: October 2026 🌸 page: list_bidir_del_rcu(9) β€” later! πŸ’…

πŸ“¦ where this page comes from