ssam_retry(9)
πΈ ssam_retry(9) β the kernel API manual, bestie edition πΈ
okay so you've stumbled into ssam_retry(9), which lives in the Kernel API Manual and is honestly one of those tiny macros that just quietly has your back. pull up a chair π«Ά
β¨ NAME β¨
ssam_retry β retry request in case of I/O errors or timeouts up to three times in total.
like, yes, that's the whole name section, it's a humble king π
π SYNOPSIS π
ssam_retry (request , args... );
that's it. that's the whole vibe. call it with a request and some args and let it cook π
π ARGUMENTS π
requestβ the request function you want to execute. and listen, it must return an integer, no cap. if it returns something else we're gonna have a bad time πargsβ the arguments for the request function. all of them. whatever it needs, you pass along, angel π
π¦ DESCRIPTION π¦
so what actually happens? you give it a request function, and it executes it β i.e. it calls request. simple. iconic. no notes.
but here's the main character energy: if that request comes back with -EREMOTEIO (which means I/O error, ew) or -ETIMEDOUT (the request, or the underlying packet, timed out β literally the worst), then request gets re-executed again. and again. up to three times in total. it's giving persistence, it's giving "I will not give up on you" π
and if you're like "hmm, I want something more generic than this", go peep __ssam_retry β there's a more generic macro for exactly this purpose, iykyk π₯
β RETURN β
returns the return value of the last execution of request. so whichever attempt was the final one, that's the answer you're getting back, bestie π
π SEE ALSO π
the full squad, in order, because I would never leave anyone out:
- Kernel file
./include/linux/surface_aggregator/controller.h enum ssam_event_flags(9)struct ssam_event(9)enum ssam_request_flags(9)struct ssam_request(9)struct ssam_response(9)struct ssam_request_sync(9)ssam_request_sync_set_data(9)ssam_request_sync_set_resp(9)ssam_request_sync_wait(9)ssam_request_do_sync_onstack(9)__ssam_retry(9)struct ssam_request_spec(9)struct ssam_request_spec_md(9)SSAM_DEFINE_SYNC_REQUEST_N(9)SSAM_DEFINE_SYNC_REQUEST_W(9)SSAM_DEFINE_SYNC_REQUEST_R(9)SSAM_DEFINE_SYNC_REQUEST_WR(9)SSAM_DEFINE_SYNC_REQUEST_MD_N(9)SSAM_DEFINE_SYNC_REQUEST_MD_W(9)SSAM_DEFINE_SYNC_REQUEST_MD_R(9)SSAM_DEFINE_SYNC_REQUEST_MD_WR(9)enum ssam_notif_flags(9)struct ssam_notifier_block(9)ssam_notifier_from_errno(9)ssam_notifier_to_errno(9)struct ssam_event_registry(9)struct ssam_event_id(9)enum ssam_event_mask(9)SSAM_EVENT_REGISTRY(9)enum ssam_event_notifier_flags(9)struct ssam_event_notifier(9)ssam_notifier_unregister(9)
go read them all. I'll wait. π
and that's the page!! this little cutie comes from ./include/linux/surface_aggreg... and it's dated October 2026 β so yeah, mark your calendar, screenshot it, frame it, whatever you gotta do π§ββοΈβ¨ mwah, bye bestie π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms