HomeFreeBSD

linuxkpi: Introduce a properly typed jiffies

Description

linuxkpi: Introduce a properly typed jiffies

Now that we have a long-sized tick counter, we can migrate to using
properly typed timeout parameters in various bits of the LinuxKPI. This
fixes a subtle incompatibility that is otherwise difficult to paper over
and leads to bugs when ticks values are sign-extended.

  • Introduce a "jiffies" symbol in subr_ticks.S, declared only in the LinuxKPI as an unsigned long.
  • Remove all references to "ticks" from the LinuxKPI.
  • Convert interfaces to match Linux's type signatures where it makes sense.

Reviewed by: manu
Tested by: bz
Differential Revision: https://reviews.freebsd.org/D48523

Details

Provenance
markjAuthored on Jan 11 2025, 11:06 PM
Reviewer
manu
Differential Revision
D48523: linuxkpi: Introduce a properly typed jiffies
Parents
rG4fa275a5f357: queue(3): Add simple tests for some macros for all list/tailq types
Branches
Unknown
Tags
Unknown