DIV_U64_ROUND_UP(9)
π DIV_U64_ROUND_UP π
okay so bestie, welcome to the DIV_U64_ROUND_UP(9) page from the Kernel API Manual β this one is a tiny little math situation and it is honestly iconic. Unsigned 64bit divide, 32bit divisor, but make it round up. π
πΈ NAME πΈ
DIV_U64_ROUND_UP β unsigned 64bit divide with 32bit divisor rounded up
π SYNOPSIS π
DIV_U64_ROUND_UP (ll , d );
that's the call, bestie β no cap.
π¦ ARGUMENTS π¦
llβ unsigned 64bit dividend. The big ol' number being divided.dβ unsigned 32bit divisor. The 32bit number doing the dividing.
β¨ DESCRIPTION β¨
Divide unsigned 64bit dividend by unsigned 32bit divisor and round up. Literally the whole plot: the division happens, the answer rounds up, main character energy only. π
π RETURN π
dividend / divisor rounded up. That's the returned value, periodt.
π₯ SEE ALSO π₯
Kernel file ./include/linux/math64.h, plus this whole friend group:
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)DIV64_U64_ROUND_CLOSEST(9)DIV_U64_ROUND_CLOSEST(9)DIV_S64_ROUND_CLOSEST(9)roundup_u64(9)
cute sign-off: this page is sourced from ./include/linux, dated October 2026, and the footer says DIV_U64_ROUND_UP(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