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 15:09:55 +0100
Martin Husemann <martin%duskware.de@localhost> wrote:

> On Mon, Feb 08, 2010 at 03:04:07PM +0100, Frank Wille wrote:
> > [...] May I acquire this mutex during a callout (which is a
> > softint, as I understand)? Will the softint sleep or busy-wait?
> 
> Depends on the mutex type, from mutex(9):
> [...]
>                  Adaptive mutexes cannot be acquired from a hardware
> interrupt handler.
> [...]
> The wording is not explicit, but a softint is not allowed to block on
> an adaptive mutex,

Yes, this is what I thought as well, but the man page only mentions
hardware interrupts. Are you sure about it?

Hmmm... from softint(9):
     [...] Unlike hardware interrupts,
     software interrupts do have thread context.  They may block on synchro-
     nization objects, sleep, and resume execution at a later time.
     [...]

IMHO that would allow my callout to sleep on acquiring the mutex?

-- 
Frank Wille


Home | Main Index | Thread Index | Old Index