LAST_ARG(9)
π LAST_ARG(9) β the Kernel API Manual glow-up
okay bestie, welcome to LAST_ARG β yeah it's a section 9 kernel API page, don't panic, it's literally one of the smol ones π«Ά (that (9) at the top is just the manual section, no cap).
β¨ NAME β¨
LAST_ARG β returns the last argument. that's it. that's the whole vibe π
β¨ SYNOPSIS β¨
LAST_ARG (args... );
β¨ ARGUMENTS β¨
argsβ the arguments, bestie. plural. use them wisely π
β¨ DESCRIPTION β¨
so here's the tea β β this helper macro lets you manipulate the argument list before you pass it along to the next level macro. it's giving backstage-pass-for-your-args energy π₯
and like COUNT_ARGS, this macro works up to 12 arguments. twelve. that's the ceiling, don't come for her with thirteen π
β¨ EXAMPLE β¨
#define foo X,Y,Z,Q #define bar LAST_ARG(foo)
with the definitions above, bar expands to Q. slay. queen of being last π
π
β¨ SEE ALSO β¨
the whole friend group lives in the kernel file ./drivers/gpu/drm/xe/xe_args.h π¦ β go say hi to:
okay that's the whole page, you ate that honestly π
mwah π this lil masterpiece lives in ./drivers/gpu/drm/xe, dropped October 2026, and it's part of the Kernel API Manual (that's the LAST_ARG(9) energy right there). go forth and grab your last arg, icon β¨π
π¦ 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