roundup_pow_of_two(9)
π NAME π
Okay bestie, welcome to the Kernel API Manual β this one is roundup_pow_of_two(9), and it does exactly what the name says: roundup_pow_of_two rounds the given value up to nearest power of two, and @n is the parameter. π
β¨ SYNOPSIS β¨
Like, this is literally the whole call:
roundup_pow_of_two (n );
π ARGUMENTS π
nβ the docs literally say-- undescribed --. That's it. That's the whole description, bestie. π
π¦ DESCRIPTION π¦
Okay so the vibe is: round the given value up to the nearest power of two. It's giving math, but make it kernel. π§
- π«Ά the result is undefined when
n == 0β no cap, the page says undefined, so zero is genuinely not the moment. - β this can be used to initialise global variables from constant data β yep, that's the documented use, periodt.
π SEE ALSO π
Kernel file ./tools/include/linux/log2.h, plus ilog2(9) and rounddown_pow_of_two(9) β go read those too, iykyk. π
mwah π this cutie is from ./tools/include/linux, dated October 2026 β thatβs the source/version and date, bestie. periodt. π
π¦ 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