xa_erase(9)
π xa_erase β like, from the Kernel API Manual, bestie
okay so picture this: you've got an XArray, right? and there's this ONE entry that just needs to GO. that's xa_erase, and honestly she's the moment. the manual is xa_erase(9) and yes she ate β¨
πΈ SYNOPSIS πΈ
void * xa_erase (struct xarray *xa , unsigned long index );
two things in, one thing out. simple. iconic. periodt π
π ARGUMENTS π
xaβ the XArray itself. your girl. the data structure in question π¦indexβ the index of the entry you're coming for. yes, THIS index. the one. π
β¨ DESCRIPTION β¨
so here's the tea: once this function returns, loading from index will give you NULL. like, gone. erased. she left the group chat π
but wait β there's a plot twist π«’ if index is part of a multi-index entry, then all the indices get erased, and none of the entries will be part of a multi-index entry anymore. it's not a partial situation, it's an all-or-nothing situation, and honestly? respect π
π₯ CONTEXT π₯
any context. literally any. she's flexible like that π§ and ngl, she takes and releases the xa_lock β so the locking is handled, bestie, that's not your problem π
β RETURN β
she gives you back the entry that used to be at this index. like a little souvenir from before the erasure π keep it, throw it away, whatever β it's yours now π«Ά
π SEE ALSO π
okay this is the part where I introduce you to the whole friend group π these are all in the kernel file ./lib/xarray.c, and they're all giving main character energy:
xas_load(9),xas_nomem(9),xas_free_nodes(9),xas_create_range(9),xas_store(9)xas_get_mark(9),xas_set_mark(9),xas_clear_mark(9),xas_init_marks(9)xas_split_alloc(9),xas_split(9),xas_try_split_min_order(9),xas_try_split(9)xas_pause(9),xas_find(9),xas_find_marked(9),xas_find_conflict(9)xa_load(9),__xa_erase(9),__xa_store(9),xa_store(9)__xa_cmpxchg(9),__xa_insert(9),xa_store_range(9)xas_get_order(9),xa_get_order(9)__xa_alloc(9),__xa_alloc_cyclic(9)__xa_set_mark(9),__xa_clear_mark(9),xa_get_mark(9),xa_set_mark(9),xa_clear_mark(9)xa_find(9),xa_find_after(9),xa_extract(9),xa_delete_node(9),xa_destroy(9)
iykyk π₯ go read them, they're all slay π
and that's the whole page, bestie!! this one came out of ./lib and the footer says October 2026 β so yeah, mark your calendar ποΈ love u, bye!! πβ¨ππ¦πΈ
π¦ 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