XA_STATE_ORDER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… XA_STATE_ORDER πŸ’…

okay so bestie, welcome to XA_STATE_ORDER(9) from the Kernel API Manual β€” yes we're reading kernel docs together, this is our era πŸŽ€


✨ NAME ✨

XA_STATE_ORDER β€” literally just declares an XArray operation state. that's it. that's the whole job. queen behavior honestly πŸ‘‘


🌸 SYNOPSIS 🌸

XA_STATE_ORDER (name , array , index , order );

yes the spacing is a little chaotic, we don't judge, we copy it exactly 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • name β€” what you're calling this operation state. the docs say it's usually xas, and honestly? iconic naming convention, no notes.
  • array β€” the array you wanna operate on. the main character of this whole situation.
  • index β€” the initial index of interest. where the vibes begin.
  • order β€” the order of the entry. yes it's a real parameter, yes you need it, no you can't skip it πŸ’…

πŸ’– DESCRIPTION πŸ’–

so what this does: it declares and initialises an xa_state on the stack. right there, on your stack, no malloc, no drama ✨

this one is the variant of XA_STATE that lets you specify the 'order' of the element you actually want to operate on β€” that's the whole flex. same energy as XA_STATE, just with the order knob turned on πŸ”₯

ngl the original source ends that sentence with a lil stray ` and honestly? we're keeping it, it's part of the lore 😭 it's giving "shipped on a friday" energy and we respect it

🌈 SEE ALSO 🌈

the kernel file lives at ./include/linux/xarray.h and bestie, the friend group is huge. every single one of these, no cap, go look at them:


πŸ’€ real talk though: knowing xas_set_order(9) exists is like finding out your fave has a sibling who's also famous. go read them all. iykyk πŸ’œ

and that's the page !! source is ./include/linux, dated October 2026 β€” mwah, slay, go write some xarray code bestie πŸ§šβ€β™€οΈβ­πŸ’–

πŸ“¦ where this page comes from