SSAM_DEFINE_SYNC_REQUEST_WR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– SSAM_DEFINE_SYNC_REQUEST_WR(9) β€” like, the Kernel API Manual, section 9 bestie ✨

okay so before we even start β€” this is a page from the Kernel API Manual (section 9, iykyk), and it's about that macro life. stay with me, it's actually so good.


🌸 NAME 🌸

SSAM_DEFINE_SYNC_REQUEST_WR β€” define a synchronous SAM request function that's got both an argument AND a return value. both. not one. both. we love a versatile icon πŸ’…


✨ SYNOPSIS ✨

SSAM_DEFINE_SYNC_REQUEST_WR (name , atype , rtype , spec... );

πŸŽ€ ARGUMENTS πŸŽ€

  • name β€” the name of the generated function. you get to pick it bestie, that's your baby's name 🍼
  • atype β€” the type of the request's argument.
  • rtype β€” the type of the request's return value.
  • spec β€” the specification (a struct ssam_request_spec) that defines the request. this is the blueprint, the vision board, the whole plan πŸ’«

πŸ¦‹ DESCRIPTION πŸ¦‹

so what this actually does: it defines a function that executes the synchronous SAM request specified by spec, where the request takes an argument of type atype and has a return value of type rtype. (both! she does both!) πŸ˜­πŸ’–

the generated function is genuinely such a hard worker β€” she handles setting up the request and response structs, the buffer allocation, AND execution of the request itself, and she returns once the request has been fully completed. no half-finished energy here. periodt.

heads up: the required transport buffer gets allocated on the stack. that's just how it is, no cap.

the generated function is defined as:

static int name(struct ssam_controller *ctrl, const atype *arg, rtype *ret)

and it returns the status of the request β€” zero on success and negative on failure πŸ‘‘

breaking down the parameters, bestie:

  • ctrl β€” the controller via which the request is sent.
  • arg β€” the request argument, specified via this pointer.
  • ret β€” the request's return value gets written to the memory pointed to by this parameter.

if you want the full tea on how the generated function behaves, go read ssam_request_do_sync_onstack. she's the main character, this macro is just her vibe πŸ’œ


🧚 SEE ALSO 🧚

everything is connected, it's giving cinematic universe 🌈

Kernel file ./include/linux/surface_aggregator/controller.h:


and that's the whole page, bestie, you ate that 🫢✨ πŸ’…

source: ./include/linux/surface_aggreg... β€” dated October 2026 πŸŽ€ cheers from SSAM_DEFINE_SYNC_REQUEST_WR(9), mwah πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from