diff_by_scaled_ppm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… diff_by_scaled_ppm(9)

okay so bestie, welcome to the Kernel API Manual 🫢 this one's about diff_by_scaled_ppm, and it's literally just math with extra steps. buckle up πŸŽ€


✨ NAME ✨

diff_by_scaled_ppm β€” calculate difference using scaled ppm 🌸


✨ SYNOPSIS ✨

bool diff_by_scaled_ppm (u64 base , long scaled_ppm , u64 *diff );

like, that's the whole vibe. three args, one bool. slay πŸ’…


✨ ARGUMENTS ✨

  • base β€” the base increment value you're adjusting, bestie. the starting point. the main character πŸ‘‘
  • scaled_ppm β€” the scaled parts per million you're adjusting by. yes it's scaled, don't come for me πŸ™ˆ
  • diff β€” on return, this holds the absolute value of the calculated diff. so it's an out-param, meaning it gets filled in after the call. iykyk ✨

✨ DESCRIPTION ✨

so what it does is: calculate the difference to adjust the base increment, using scaled parts per million. that's it, that's the whole function πŸ¦‹

and here's the cute little trick β€” it uses mul_u64_u64_div_u64 to do the difference calculation, specifically to avoid possible overflow πŸ”₯ no cap, that matters, because u64 math overflowing is not the vibe and would ruin everything 😭


✨ RETURN ✨

returns true if scaled_ppm is negative, and false otherwise. literally that simple, periodt. πŸ’€


✨ SEE ALSO ✨

okay this list is long but every single one is here, i promise, no skipping, we don't do that here πŸ’–

ngl ptp_clock_event(9) shows up twice in the original list and i'm keeping it twice because i don't invent or merge things. facts are facts, bestie 🧚

alright that's the whole page!! 🌈 this absolute icon lives under ./include/linux, dated October 2026, and goes by diff_by_scaled_ppm(9) β€” mwah, take care of her πŸ’œπŸ“

πŸ“¦ where this page comes from