diff_by_scaled_ppm(9)
π 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 π
- the kernel file
./include/linux/ptp_clock_kernel.h - struct
ptp_clock_request(9) - struct
ptp_system_timestamp(9) - struct
ptp_clock_info(9) - struct
ptp_clock_event(9) scaled_ppm_to_ppb(9)adjust_by_scaled_ppm(9)ptp_clock_register(9)ptp_clock_unregister(9)ptp_clock_event(9)ptp_clock_index(9)ptp_clock_index_by_of_node(9)ptp_clock_index_by_dev(9)ptp_find_pin(9)ptp_find_pin_unlocked(9)ptp_schedule_worker(9)ptp_cancel_worker_sync(9)ptp_get_vclocks_index(9)ptp_convert_timestamp(9)
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
- 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