SSAM_DEFINE_SYNC_REQUEST_W(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so picture this: you're deep in the Kernel API Manual (yes, that one, the SSAM_DEFINE_SYNC_REQUEST_W(9) page, section 9, we love a numbered section) and you need a synchronous SAM request function that takes an argument. Say less. This macro has you covered, and honestly? It ate. 🫢


✨ NAME ✨

SSAM_DEFINE_SYNC_REQUEST_W β€” define a synchronous SAM request function with an argument. That's the whole vibe. No return value, one argument, done. πŸŽ€


🌸 SYNOPSIS 🌸

SSAM_DEFINE_SYNC_REQUEST_W (name , atype , spec... );

(yes, the spacing is exactly like that, don't come for me, I'm just the messenger πŸ’€)


πŸ¦‹ ARGUMENTS πŸ¦‹

  • name β€” the name of the function you're generating. You get to pick it! Main character energy, truly. πŸ‘‘
  • atype β€” the type of the request's argument. So like, what kind of thing are we passing in here.
  • spec β€” the specification (that's a struct ssam_request_spec) that defines the request. This is the blueprint, the mood board, the whole plan. ✨

πŸ’– DESCRIPTION πŸ’–

Okay so what this macro 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 no return value. Like, none. Zero. Nada. πŸ’€

The generated function is literally doing the most for you β€” it sets up the request struct, it handles buffer allocation, and it executes the request itself, returning once the request has been fully completed. And the required transport buffer? Allocated on the stack. We love a low-effort allocation moment. 🌈

The generated function is defined as:

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

and it returns the status of the request: zero on success, negative on failure. Periodt. πŸ’…

So the ctrl parameter is the controller via which the request is sent (the messenger 🧚), and the request argument is specified via the arg pointer (the actual payload, the star of the show ⭐).

If you wanna know more about how the generated function behaves β€” like, the full lore β€” go check out ssam_request_do_sync_onstack. It's giving "read the docs" but make it cute. πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/surface_aggregator/controller.h, plus the whole friend group:


ngl bestie, this whole page lives at ./include/linux/surface_aggreg... and it's dated October 2026, so go off, time traveler πŸ•°οΈβœ¨

and that's the page!! sourced from the Kernel API Manual, dated October 2026, file ./include/linux/surface_aggreg... β€” mwah, ty for reading, ily, bye πŸ’œπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from