div64_s64(9)
π div64_s64(9) β the kernel API manual, bestie edition
okay so real quick, the page header situation: this is div64_s64(9) straight out of the Kernel API Manual, and honestly? it's giving "small function, big responsibilities." let's get into it π«Ά
β¨ NAME β¨
div64_s64 β signed 64bit divide with 64bit divisor
like yes, that's the whole vibe. it divides. it's signed. it's 64bit on both sides. slay. π
πΈ SYNOPSIS πΈ
s64 div64_s64 (s64 dividend , s64 divisor );
no cap, that's the entire signature. two s64s walk in, one s64 walks out. iconic behavior only.
π ARGUMENTS π
dividendβ a signed 64bit dividend. this is the one getting chopped up, bestie. it's the main character of this operation ngl πdivisorβ a signed 64bit divisor. this is the one doing the chopping. very "i'm the moment" of it.
π RETURN π
dividend / divisor
literally just the division. that's the whole return value, no plot twist, no secret side quest. the dividend divided by the divisor. periodt. β¨
π¦ SEE ALSO π¦
okay so this is the friend group, and they're all math64.h girlies π
the kernel file is ./include/linux/math64.h and here's everyone:
div_u64_rem(9)div_s64_rem(9)div64_u64_rem(9)div64_s64_rem(9)div64_u64(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)roundup_u64(9)
go read those too, they're all lowkey obsessed with rounding and remainders and honestly same. π
ngl there's nothing dangerous on this page, it's literally just a divide. but the whole family above is worth a look if division alone isn't giving you what you need π
and that's the page, bestie!! π this whole thing lives over in ./include/linux, dated October 2026, so go forth and divide your signed 64bit values with confidence. 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