svn commit: r181191 - in head: share/man/man9 sys/kern sys/sys

John Baldwin jhb at freebsd.org
Mon Aug 4 14:08:06 UTC 2008


On Saturday 02 August 2008 01:42:39 pm Sam Leffler wrote:
> Author: sam
> Date: Sat Aug  2 17:42:38 2008
> New Revision: 181191
> URL: http://svn.freebsd.org/changeset/base/181191
>
> Log:
>   add callout_schedule; besides being useful it also improves
>   compatibility with other systems
>
>   Reviewed by:	ed, battlez

I think it probably warrants a KASSERT() that c_func isn't NULL to catch the 
case of someone doing:

	callout_init(...);

	callout_schedule(...);

I'd almost prefer that we add (func, arg) pointers to the init routines so you 
do this:

	callout_init_mtx(&sc->timer, &sc->lock, timer_func, sc);

	...

	callout_schedule(&sc->timer, hz);

Right now you have to make sure you do at least one 'callout_reset' before you 
do a 'callout_schedule' which seems bug-prone.

-- 
John Baldwin


More information about the cvs-src mailing list