Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Aug 2008 09:26:25 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Sam Leffler <sam@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: svn commit: r181191 - in head: share/man/man9 sys/kern sys/sys
Message-ID:  <200808040926.25626.jhb@freebsd.org>
In-Reply-To: <200808021742.m72HgdBX031929@svn.freebsd.org>
References:  <200808021742.m72HgdBX031929@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808040926.25626.jhb>