xa_empty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xa_empty(9) β€” like, the Kernel API Manual page, bestie πŸŽ€

okay so picture this: you're deep in the kernel, you've got an XArray, and you just need to know β€” is there anything in here or is it giving empty? that's the whole gig of xa_empty(). she's a tiny little function from the (9) section of the Kernel API Manual and she ate, no cap ✨


✨ NAME ✨

xa_empty β€” determine if an array has any present entries 🫢

like, literally just: does this XArray have any present entries or nah? vibe check for your array πŸ’–


🌸 SYNOPSIS 🌸

bool xa_empty (const struct xarray *xa );

yes that's the whole thing. one function, one argument, returns a bool. iconic behavior honestly πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • xa β€” the XArray. that's it. that's the argument. she's the XArray you're checking πŸ’…

🌈 CONTEXT 🌈

Any context. literally any. no restrictions, no "sorry bestie you can't call this from an interrupt", none of that. you're free 🌸


⭐ RETURN ⭐

returns true if the array contains only NULL pointers πŸ’€

that's the tea β€” it's true when only NULL pointers are in there. if there's anything actually present, you're getting false, sorry 😭


πŸ‘‘ SEE ALSO πŸ‘‘

okay so this is the part where the manpage just dumps the entire XArray extended universe on you. buckle up bestie, we're going through the whole friend group 🫢

Kernel file ./include/linux/xarray.h, plus:

like I said. the whole extended universe. go read them, iykyk πŸ’œ


ngl the fact that true means "only NULL pointers" is the one thing people get twisted on, so don't let it catch you lacking πŸ™ˆ

that's the page babes πŸ’– this little bundle of joy lives in ./include/linux and the version on this copy is dated October 2026 β€” go forth and vibe check those arrays πŸŒˆβœ¨πŸ“

πŸ“¦ where this page comes from