xa_store(9)
β¨ xa_store(9) β¨
okay so this is a page from the Kernel API Manual β yes, the Kernel API Manual, we're in the big leagues now bestie π
π NAME π
xa_store β store this entry in the XArray. that's it. that's the whole vibe. one job, and it does it π
πΈ SYNOPSIS πΈ
void * xa_store (struct xarray *xa , unsigned long index , void *entry ,
gfp_t gfp );
look at her. four little arguments. iconic behavior fr fr β¨
π¦ ARGUMENTS π¦
xaβ the XArray. your main character. the whole point π«Άindexβ index into array. like, where in the array we're talking about, yk?entryβ new entry. the thing you're putting in there. slay πgfpβ memory allocation flags. the rules of the game for grabbing memory π
π DESCRIPTION π
so after this function returns, loads from this index will return entry. no cap, that's the guarantee β you put it there, you get it back β¨
storing into an existing multi-index entry updates the entry of every index. like, all of them. not just one. every single one, bestie π
the marks associated with index are unaffected β unless entry is NULL. that's the one exception, and it's lowkey important, so don't come for me when i say it twice: unaffected unless entry is NULL π
π₯ CONTEXT π₯
any context. literally any. takes and releases the xa_lock π β yes she locks, she's responsible like that.
may sleep if the gfp flags permit π΄ so like, know your flags, iykyk.
β RETURN β
here's what you get back:
- the old entry at this index on success π
xa_err(-EINVAL)ifentrycannot be stored in an XArray πxa_err(-ENOMEM)if memory allocation failed π
wrap those last two in xa_err() before you check them, alright? that's not me being extra, that's just how it is π§
π SEE ALSO π
okay this list is long and honestly kind of a flex π
kernel file ./lib/xarray.c
then, in order, because we do not skip:
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_erase(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)
like i said. she has friends π
and that's the whole page, bestie π«Ά go forth and store your entries responsibly β¨
this lil masterpiece lives in ./lib, it's dated October 2026, and it's filed under xa_store(9) π mwah π
π¦ 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