Updating callout_reset

Poul-Henning Kamp phk at phk.freebsd.dk
Sun Jan 25 22:34:30 PST 2004


In message <20040125230314.S730 at odysseus.silby.com>, Mike Silbersack writes:

>In order to ensure that modules and the like do not break, I would like to
>propose that we leave callout_reset defined as is and create a new
>function, callout_set (or some other clever name) which takes a struct
>*timespec in place of ticks.

No, not timespec.

Timespecs are stupid, slow, clumsy and unhandy and cumbersome.

With a timespec you either need an MPunsafe hack function like
libevents evConsTime() or a local stack variable.

Make it a 64bit count of nanoseconds instead that way it can be
used as a literal constant.

It's OK with me if we want to have a function to contain the "*
1000000000LL" factor for us, and maybe even convenience functions
for milli and microseconds.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list