rounddown_pow_of_two(9)
π NAME π
rounddown_pow_of_two β round the given value down to nearest power of two.
@n β parameter.
Welcome to the Kernel API Manual glow-up for rounddown_pow_of_two(9), bestie πβ¨
β¨ SYNOPSIS β¨
rounddown_pow_of_two (n );
πΈ ARGUMENTS πΈ
nβ-- undescribed --π (yes, the manpage really leaves it at that, no cap).
π¦ DESCRIPTION π¦
okay so the vibe is: round the given value down to the nearest power of two β¨
- the result is undefined when
n == 0π β like, fr fr undefined, so don't be out here expecting a cute answer. - this can be used to initialise global variables from constant data π β iconic behaviour, honestly.
π SEE ALSO π
- Kernel file
./tools/include/linux/log2.h ilog2(9)roundup_pow_of_two(9)
π«Ά final sign-off: source/version./tools/include/linux, dateOctober 2026, titlerounddown_pow_of_two(9)β mwah! πβ¨
π¦ 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