__swahw32p(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __swahw32p β€” the Kernel API Manual, but make it make sense ✨

okay so bestie, you opened __swahw32p(9) from the Kernel API Manual and you're standing there like πŸ§β€β™€οΈ... don't worry, this one's short and honestly kinda iconic. it's the pointer-flavoured twin of __swahw32, and we're gonna get you through it. no cap. 🫢


✨ NAME ✨

__swahw32p β€” returns a wordswapped 32-bit value pulled straight from a pointer πŸ’–

like, it's giving "dereference but make it byte-shuffled." main character energy fr fr.


🌸 SYNOPSIS 🌸

__u32 __swahw32p (const __u32 *p );

that's it. that's the whole vibe check. one function, one pointer, one __u32 coming back at you. πŸ¦‹


πŸŽ€ ARGUMENTS πŸŽ€

  • p β€” a pointer to a naturally-aligned 32-bit value. ngl the "naturally-aligned" part is doing a lot of work here, so pls respect it πŸ™ˆ β€” don't be out here handing it some cursed misaligned address, bestie.

πŸ‘‘ DESCRIPTION πŸ‘‘

so the actual wordswapping behaviour? that's __swahw32's whole storyline. this page is basically like "go read __swahw32 for details of wordswapping" β€” and honestly? valid. the lore lives over there. πŸ“–βœ¨

think of __swahw32p as the pointer-access version: it grabs the value through p and gives you the wordswapped result. the swapping semantics themselves are not re-explained here, so if you want the full breakdown you gotta slide into __swahw32's DMs. πŸ’Œ


πŸ’« SEE ALSO πŸ’«

bestie the friend group is huge and we love them all. these all live in the kernel file ./include/uapi/linux/swab.h πŸ“:

iykyk β€” the p girlies are pointers, the s girlies are the in-place squad, and the plain ones are just doing their thing. go read them all, you'll eat. πŸ”₯


lowkey reminder: this page only promises to return a wordswapped 32-bit value from a pointer, and it defers all the actual swapping details to __swahw32. don't invent extra behaviour, babe β€” that's not the assignment πŸ’€

and that's the whole page, periodt. πŸŽ€ sourced from ./include/uapi/linux, dated October 2026 β€” so yes, she's from the future, and yes, she still slays. bye bestie, go swap some words πŸ’œπŸ‘‘

πŸ“¦ where this page comes from