PICK_ARG(9)
β¨ NAME β¨
okay so bestie, this is PICK_ARG(9) from the Kernel API Manual, and the whole vibe is simple: it returns the n-th argument. periodt π
π SYNOPSIS π
the signature is literally right here, no cap:
PICK_ARG (n , args... );
πΈ ARGUMENTS πΈ
nβ the argument number to be returned, bestie β like, which one you want back.argsβ the arguments themselves. the whole squad.
π¦ DESCRIPTION π¦
okay so this helper macro is lowkey here to manipulate the argument list before passing it to the next level macro. no cap, that's the whole job. π
like COUNT_ARGS, this macro supports n up to 12. and the specialized macros PICK_ARG1 to PICK_ARG12 are also available β iconic, honestly. β¨
π EXAMPLE π
the page lays out the definitions like this (yes, literally):
#define foo X,Y,Z,Q #define bar PICK_ARG(2, foo) #define buz
PICK_ARG3(foo)
with the above definitions, bar expands to Y and buz expands to Z. slay. π₯
π SEE ALSO π
kernel file ./drivers/gpu/drm/xe/xe_args.h β and the whole bestie squad, iykyk:
okay that's the page, bestie. this one comes from ./drivers/gpu/drm/xe and is dated October 2026 β mwah, bye π«Άβ¨
π¦ 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