xas_split(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xas_split (section 9, Kernel API Manual, bestie)

okay so welcome to xas_split(9) β€” it lives in the Kernel API Manual and it's literally the glow-up function for XArray entries. it takes one big multi-index entry and splits it into smaller ones. iconic behavior, no notes.


✨ NAME ✨

xas_split β€” split a multi-index entry into smaller entries. that's it, that's the whole job, and she does it slayfully πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

void xas_split (struct xa_state *xas , void *entry , unsigned int order );

yes the spacing is exactly like that, don't come for me, I'm keeping it verbatim fr fr.


🌸 ARGUMENTS 🌸

  • xas β€” the XArray operation state. this is the main character of the whole call, she's carrying the context 🫢
  • entry β€” the new entry you wanna store in the array. the fresh fit being handed out πŸ’…
  • order β€” the current entry order. yes, order matters, it always does 😌

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: the size of the new entries is set inside xas β€” that's where the info lives, not in a separate argument, okay?

and the value sitting in entry? it gets copied to all the replacement entries. every single one. nobody gets left out, we love equal distribution in this house ✨

tl;dr β€” you give her a state, an entry, and an order, and she multiplies that entry into smaller ones with the size info she already had. periodt.

πŸ”₯ CONTEXT πŸ”₯

any context works β€” she's flexible like that, lowkey applies anywhere 🧚

but the caller should hold the xa_lock. that's not a suggestion bestie, that's the vibe check you gotta pass before you call her πŸ™ˆπŸ”’


πŸ‘‘ SEE ALSO πŸ‘‘

the whole xarray.c friend group, in original order, because I would never do them dirty by reordering:

the source file for all this magic is the kernel file ./lib/xarray.c β€” go read her, she ate πŸ’€πŸ”₯


mwah, that's the whole page. written under ./lib, dated October 2026, and yes I'm signing off with a kiss because she deserves it πŸ’œ

πŸ“¦ where this page comes from