periodically save current time to time-of-day hardware

Andriy Gapon avg at icyb.net.ua
Fri Mar 26 15:18:11 UTC 2010


on 26/03/2010 17:12 Ed Schouten said the following:
> * Andriy Gapon <avg at icyb.net.ua> wrote:
>> +	timeout(periodic_resettodr, NULL, 1800 * hz);
> 
> By the way, wouldn't it be a little nicer to use callout(9)?

I don't know :-)
I see that timeout is deprecated and is unsafe in some respects, but using callout
adds a bit more code/churn without any obvious benefit.
For example, I don't use any fine-grained locking here, nor do I do drain or stop,
so all of the good features of callout are not used.
But perhaps I am missing something and I really ought to use some of those
features somewhere?

-- 
Andriy Gapon


More information about the freebsd-hackers mailing list