roundup_u64(9)
β¨ roundup_u64(9) β¨
okay so bestie, we're in the Kernel API Manual today (section 9, the good stuff) and the star of the show is roundup_u64 β the glow-up your u64 didn't know it needed π
π NAME π
roundup_u64 β Round up a 64bit value to the next specified 32bit multiple. literally that's her whole job and she ate π₯
πΈ SYNOPSIS πΈ
u64 roundup_u64 (u64 x , u32 y );
yes bestie that's the whole signature, no cap β¨
π¦ ARGUMENTS π¦
xβ the value to up π± (yep, "to up", that's what it says, we love a noun that became a verb)yβ the32bitmultiple to round up to π―
π DESCRIPTION π
so here's the vibe: it rounds x to the next multiple of y. main character math, zero drama π«
and if you're sitting there with a 32bit x like "hiii what about me", the page says: see roundup and the faster round_up for powers of 2 π β like, those are literally right there, iykyk.
β RETURN β
the rounded up value π (that's it, that's the return, she's an overachiever at exactly one thing and we respect it)
π SEE ALSO π
bestie the whole friend group is in the Kernel file ./include/linux/math64.h β go say hi π«Ά
div_u64_rem(9)div_s64_rem(9)div64_u64_rem(9)div64_s64_rem(9)div64_u64(9)div64_s64(9)div_u64(9)div_s64(9)mul_u64_add_u64_div_u64(9)mul_u64_u64_div_u64(9)mul_u64_u64_div_u64_roundup(9)DIV64_U64_ROUND_UP(9)DIV_U64_ROUND_UP(9)DIV64_U64_ROUND_CLOSEST(9)DIV_U64_ROUND_CLOSEST(9)DIV_S64_ROUND_CLOSEST(9)
ok that's the whole page, no notes π β go round something up and be iconic about it π§
sign-off szn: this one lives over at ./include/linux, dated October 2026 π mwah, love u, 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