div_s64_rem(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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:

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