ktime_compare_safe(9)
π ktime_compare_safe β from the Kernel API Manual, bestie β¨
Okay so picture this: you're out here comparing two ktime structures, right? And like... what if they overflow? π That's literally the whole plot of this macro. It's the glow-up version of the standard ktime_compare() function β same energy, but it also attempts to handle ktime overflows. Not me being obsessed with a safety net, but here we are π«Ά
β¨ SYNOPSIS β¨
ktime_compare_safe (A , B );
That's it. Two little arguments and you're seated π
π ARGUMENTS π
Aβ the firstktimevalue, aka the main character πBβ the secondktimevalue, the costar of this little comparison π¦
π₯ RETURN π₯
The vibe check results are in, and there are exactly three outcomes:
-1ifA < B0ifA == B1ifA > B
No in-between, no "it's complicated" β iconic behavior honestly π
πΈ SEE ALSO πΈ
- The kernel file
./drivers/gpu/drm/msm/disp/dpu1/dpu_kms.hβ go read it, iykyk π DPU_DEBUG(9)DPU_DEBUG_DRIVER(9)
Quick reminder bestie: this one attempts to also handle ktime overflows β that word "attempts" is doing a lot of work so like, don't @ me, just know what you're getting into π
and that's the whole page, bestie π straight from ./drivers/gpu/drm/msm/disp/dpu1, dated October 2026 β slay, ate, periodt πβ¨
π¦ 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