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
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to