Subject: Re: timedwork
To: None <ad@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 01/14/2007 17:19:38
> Hi,
> 
> On Sat, Jan 13, 2007 at 09:11:06PM +0900, YAMAMOTO Takashi wrote:
> 
> > > I'm thinking something like:
> > > 
> > > 	callout_init(&c);
> > > 	callout_setwork(&c, func, arg);
> > > 	callout_schedule(&c, timeout);
> > 
> > i implemented it.  see the attached patch.
> > 
> > once callout_setwork() is called on a callout,
> > callout_schedule() is only legal operation on the callout.
> > (i'm not a fan of making primitives have rich functionalities...)
> 
> I would prefer not to have a seperate callout_setwork(), but instead
> a flag to callout_init that can be ignored if we later do interrupts
> as threads:
> 
> 	callout_init(&foo, CALLOUT_THREAD);
> 
> We will need to add a CALLOUT_MPSAFE flag at some point.
> 
> Andrew

what will CALLOUT_MPSAFE do, if softclock() is called with kernel_lock held?

YAMAMOTO Takashi