hlist_nulls_del_rcu(9)
π hlist_nulls_del_rcu π
okay so bestie, welcome to the Kernel API Manual page for hlist_nulls_del_rcu β she's a kernel function, she's from ./include/linux, and she is literally the moment π
β¨ NAME β¨
hlist_nulls_del_rcu β deletes an entry from a hash list without re-initialization. no re-init, no problem, she just leaves π¦
π SYNOPSIS π
void hlist_nulls_del_rcu (struct hlist_nulls_node *n );
πΈ ARGUMENTS πΈ
nβ the element to delete from the hash list. that's her, that's the girl you're removing π
π NOTE π
okay this is the part where you actually have to pay attention, bestie, because it's giving important caveats π
hlist_nulls_unhashed on entry does not return true after this. nope. the entry is in an undefined state. that's not a vibe, that's just facts. she's undefined now, periodt.
it is useful for RCU based lockfree traversal tho β that's literally her whole purpose β¨
in particular π it means that we can not poison the forward pointers that may still be used for walking the hash list. so don't go trying to poison them, she said no π
β οΈ the caller must take whatever precautions are necessary (such as holding appropriate locks) to avoid racing with another list-mutation primitive β thinkhlist_nulls_add_head_rcuorhlist_nulls_del_rcuβ running on this same list. so like, protect yourself. lock it up. π
but π
however β it is perfectly legal to run concurrently with the _rcu list-traversal primitives, such as hlist_nulls_for_each_entry. so reading while deleting? totally fine, iconic, no notes.
π SEE ALSO π
kernel file ./include/linux/rculist_nulls.h, plus the whole friend group π«Ά:
hlist_nulls_del_init_rcu(9)hlist_nulls_first_rcu(9)hlist_nulls_next_rcu(9)hlist_nulls_pprev_rcu(9)hlist_nulls_add_head_rcu(9)hlist_nulls_add_tail_rcu(9)hlist_nulls_replace_rcu(9)hlist_nulls_replace_init_rcu(9)hlist_nulls_for_each_entry_rcu(9)hlist_nulls_for_each_entry_safe(9)
and that's the whole page, bestie!! πβ¨ this one lives in ./include/linux, dated October 2026, and she goes by hlist_nulls_del_rcu(9) β lowkey a whole icon, no cap ππ¦ 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