DIV64_U64_ROUND_UP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– DIV64_U64_ROUND_UP πŸ’–

okay so this is a page from the Kernel API Manual and it's literally about one (1) macro that does math and refuses to round down. bestie, let's get into it ✨


🌸 NAME 🌸

DIV64_U64_ROUND_UP β€” unsigned 64bit divide with 64bit divisor rounded up 🫢


πŸŽ€ SYNOPSIS πŸŽ€

DIV64_U64_ROUND_UP (ll , d );

that's it. two args. no cap πŸ’…


✨ ARGUMENTS ✨

  • ll β€” the unsigned 64bit dividend, aka the number getting chopped up πŸ“
  • d β€” the unsigned 64bit divisor, aka the number doing the chopping πŸ”ͺ

πŸ¦‹ DESCRIPTION πŸ¦‹

so what it does is: divide the unsigned 64bit dividend by the unsigned 64bit divisor, and then round up. like, always up. it's giving "we don't do floor here" energy πŸ‘‘

not me being obsessed with a macro that just refuses to lose the remainder 😭


πŸ‘‘ RETURN πŸ‘‘

returns dividend / divisor rounded up πŸ’– that's the whole vibe check and it passed


🌈 SEE ALSO 🌈

oh you want the whole friend group? say less, here's the squad, all from the kernel file ./include/linux/math64.h:

go follow all of them, they're iconic 🧚


πŸ’€ lowkey a warning but honestly just a fact: this is all unsigned 64bit math, so keep your types right or the vibe check will fail and that's on periodt.

and that's the whole page, bestie πŸŽ€ sign-off time: this came from the ./include/linux section of the Kernel API Manual, dated October 2026 β€” slay, go round some numbers up πŸ’œπŸ”₯

πŸ“¦ where this page comes from