xprt_iter_xchg_switch(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xprt_iter_xchg_switch β€” like, the whole kernel API manual moment ✨

okay so bestie, welcome to xprt_iter_xchg_switch(9) β€” yes that's the page name, and yes we're in the Kernel API Manual because we're that girl πŸ’–. This is the one about atomically swapping out the rpc_xprt_switch. Big main-character energy for a function, honestly.


✨ NAME ✨

xprt_iter_xchg_switch β€” atomically swap out the rpc_xprt_switch 🫢 like it literally does the swap atomically, no cap, no half-swapped mess, we don't do that here πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct rpc_xprt_switch * xprt_iter_xchg_switch (struct rpc_xprt_iter
*xpi , struct rpc_xprt_switch *newswitch );

so it hands you back a struct rpc_xprt_switch * and takes those two args, cute and simple 🌸


πŸŽ€ ARGUMENTS πŸŽ€

  • xpi β€” pointer to rpc_xprt_iter, your iterator bestie, the one doing the holding 🫢
  • newswitch β€” pointer to a new rpc_xprt_switch, or NULL 😭 (yes, NULL is a valid vibe here, it's in the source, I don't make the rules)

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea: it swaps out the existing xpi->xpi_xpswitch with a new value. that's it. that's the whole bit. the swap happens atomically, so nobody's out here catching a half-finished switch mid-vibe-check ⭐

literally just an exchange: old one out, new one in, done, periodt πŸ‘‘


🌈 SEE ALSO 🌈

bestie go read the rest of the family, they're all iconic:


reminder bestie: newswitch can genuinely be NULL, that's not a typo, that's canon πŸ’€

and that's the page!! πŸŽ€ sourced from ./net/sunrpc, dated October 2026, sitting in the Kernel API Manual β€” mwah, slay, go swap something atomically, ily πŸ§šβ€β™€οΈπŸ’–

πŸ“¦ where this page comes from