tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kthread with kpause or callout



On Mon, 8 Feb 2010 11:29:51 +0100
Martin Husemann <martin%duskware.de@localhost> wrote:

> On Mon, Feb 08, 2010 at 11:11:04AM +0100, Frank Wille wrote:
> > - Running a kthread and calling kpause() between the polls.
> > - Using a callout which reschedules itself after the poll.
> 
> The thread is quite a bit more heavyweight, but you have full freedom
> to do what you want. The callout is pretty lightweight but you are
> still subject of "interrupt context" rules.

Ok, thanks. Then the callout should be fine for me.

I'm just unsure about using mutexes during the callout. I have an
IPL_NONE-kmutex which locks register access (my chip supports several
register banks, so I need to make sure they are not switched). May I
acquire this mutex during a callout (which is a softint, as I understand)?
Will the softint sleep or busy-wait?

-- 
Frank Wille


Home | Main Index | Thread Index | Old Index