SSAM_DEFINE...REQUEST_MD_N(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… SSAM_DEFINE...REQUEST_MD_N(9) β€” Kernel API Manual ✨

okay so bestie, welcome to the SSAM_DEFINE...REQUEST_MD_N(9) page from the Kernel API Manual β€” this one's a macro that literally builds functions for you and ngl it's kind of iconic πŸŽ€


🌸 NAME 🌸

SSAM_DEFINE_SYNC_REQUEST_MD_N β€” Define synchronous multi-device SAM request function with neither argument nor return value. Yes, neither. She takes nothing, she returns nothing, she's just vibing πŸ’…


✨ SYNOPSIS ✨

SSAM_DEFINE_SYNC_REQUEST_MD_N (name , spec... );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • name β€” Name of the generated function. you're naming your child here, choose wisely 🫢
  • spec β€” Specification (struct ssam_request_spec_md) defining the request. this is the blueprint, the vision board, the whole plan πŸ’–

πŸ‘‘ DESCRIPTION πŸ‘‘

So what does this macro do, you ask? It defines a function executing the synchronous SAM request specified by spec, with the request having neither argument nor return value. no args, no return, no notes, periodt πŸŽ€

The device specifying parameters are not hard-coded β€” instead they must be provided to the function. so like, you don't bake them in, you pass them through. flexible queen behavior πŸ’…

The generated function takes care of setting up the request struct, buffer allocation, as well as execution of the request itself, returning once the request has been fully completed. she does it all, honestly. main character energy πŸ”₯

The required transport buffer will be allocated on the stack. lowkey important detail, don't forget it πŸ‘‘

The generated function is defined as:

static int name(struct ssam_controller *ctrl, u8 tid, u8 iid)

returning the status of the request, which is zero on success and negative on failure ✨ breaking it down for you:

  • the ctrl parameter is the controller via which the request is sent 🌈
  • tid is the target ID for the request 🎯
  • iid is the instance ID 🏷️
if you want the full tea on how the generated function actually behaves, refer to ssam_request_do_sync_onstack β€” she's the source of truth, iykyk 😭

πŸ”₯ SEE ALSO πŸ”₯

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


and that's the whole page, bestie 🫢 this one came from ./include/linux/surface_aggreg... and it's dated October 2026, so mark your calendars ✨ stay hydrated, go read ssam_request_do_sync_onstack(9), and slay your kernel dev journey πŸ’œ

πŸ“¦ where this page comes from