div_s64_rem(9)
π div_s64_rem(9) π
okay so bestie, welcome to the Kernel API Manual page for div_s64_rem β yes that's the whole name, yes it's a mouthful, and yes we're gonna get through it together π«Ά
β¨ NAME β¨
div_s64_rem β signed 64bit divide with 32bit divisor with remainder
like, it does one (1) thing and it does it flawlessly π
β¨ SYNOPSIS β¨
s64 div_s64_rem (s64 dividend , s32 divisor , s32 *remainder );
the way this signature just sits there being all typed and correct π so iconic of it
β¨ ARGUMENTS β¨
dividendβ a signed 64bit dividend. like, the big number. the main character of the division, no cap πdivisorβ a signed 32bit divisor. smaller vibes, but honestly still kind of important, it's the one doing the dividing πremainderβ pointer to a signed 32bit remainder. that's where the leftover bits get to live, rent free π β¨
β¨ RETURN β¨
it sets `*remainder` first, then returns dividend / divisor π«
so like β both things happen, and one of them happens through a pointer, which is very much its whole personality. two birds, one function call π¦
fr fr, read the order it does things in: *remainder gets set, then the quotient comes back. don't skip the pointer, bestie, it's not decorative π
β¨ SEE ALSO β¨
okay this list is LONG and honestly a slay. all of these live in the kernel file ./include/linux/math64.h:
div_u64_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)roundup_u64(9)
go off, math64.h family tree πΈπ§ you have so many cousins and we love every single one of them π
that's the whole page, div_s64_rem girlies. you're now officially educated πβ¨
kisses, and remember: it's from ./include/linux, dated October 2026 β so mark your calendars and stan responsibly π
π
π¦ 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