tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Interrupt handlers in NetBSD 5.0
On Mon, Jun 08, 2009 at 09:24:26PM +0100, Mindaugas Rasiukevicius wrote:
> Hans Petter Selasky <hselasky%c2i.net@localhost> wrote:
> > I have a quick question:
> >
> > How are interrupt handlers implemented in NetBSD 5.0?
> >
>
> It looks like you are interested in software interrupts. They are described
> in softint(9) manual page.
>
> > Are the interrupt handlers deferred to an interrupt thread so that locking
> > a kernel mutex from within the interrupt handler is allowed?
>
> Yes, mutex(9) could be used from soft interrupt handlers.
To elaborate on what Mindaugas said:
- Interrrupt handlers look somewhat like a traditional Unix system, but
there are fewer priority levels.
- Software interrupts work like hardware interrupts for the most part, but
they have partial thread context and so can sleep on locks. This works a
bit like Solaris, if you are familiar with it.
- There's no implicit deferral of work to threads like FreeBSD does with
hardware interrupts. If you need thread context for locking then work must
be passed to another level: to a softint, to a workqueue, to the eventual
consumer, or to a kthread using a custom mechanism.
Also have a look at the spl(9) page, it gives some more details on interrupt
structure and what you can do at the various priority levels.
Home |
Main Index |
Thread Index |
Old Index