xa_erase_irq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ xa_erase_irq β€” the Kernel API Manual, bestie edition πŸ’…

okay so you've wandered into xa_erase_irq(9) from the Linux Kernel API Manual and honestly? you picked a good one. it's short, it's sweet, it deletes things. let's get into it 🫢


🌸 NAME 🌸

xa_erase_irq β€” literally just: erase this entry from the XArray. that's the whole vibe check. no cap.


πŸŽ€ SYNOPSIS πŸŽ€

void * xa_erase_irq (struct xarray *xa , unsigned long index );

it gives back a void * and it takes two things. we love a simple signature ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • xa β€” the XArray. like, the whole container you're operating on. your main character data structure πŸ‘‘
  • index β€” the index of the entry. which slot we're coming for πŸ’€

🌈 DESCRIPTION 🌈

so here's the tea πŸ“: after this function returns, loading from index will return NULL. gone. deleted. not coming back. the entry has left the chat.

and if the index is part of a multi-index entry? okay this is the important part, don't skip it πŸ™ˆ β€” all indices will be erased, and none of the entries will be part of a multi-index entry anymore. the whole squad gets yeeted, not just the one index you pointed at. periodt.


πŸ”₯ CONTEXT πŸ”₯

Process context. that's non-negotiable bestie.

it takes and releases the xa_lock while disabling interrupts. so like, it's got the lock situation handled for you β€” but that also means you need to be somewhere interrupts can be disabled, iykyk. don't be weird about it.


⭐ RETURN ⭐

returns the entry which used to be at this index β€” like, the thing that was there before you erased it. a little souvenir πŸŽ€


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/linux/xarray.h β€” and ok there are a LOT of friends in this family, so buckle up 🧚:

like I said. a whole friend group 🌸


lowkey reminder: erasing from a multi-index entry nukes every index in it. that's not a bug, that's just how it is. go forth and be careful 🫢

and that's the page!! sourced from ./include/linux in this Kernel API Manual, dated October 2026 β€” mwah, iconic, no notes πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from