Re: Calling current() from interrupt context

From: Francis Galiegue (fg@mandrakesoft.com)
Date: Mon Oct 09 2000 - 08:05:21 EST


On Sun, 8 Oct 2000, Kenn Humborg wrote:

>
> I'd just like to confirm that it's illegal to call current()
> from interrupt-handling code.
>
> I'm working on the VAX port and the reason I ask is that the
> VAX has separate stack pointers for user, kernel and interrupt
> contexts. Therefore, the current = (SP & ~8192) hack will give
> completely bogus results when handling an interrupt.
>
> My feeling is that interrupt code has no business calling current(),
> but I don't know the kernel well enough to be sure. Is there any
> interrupt-level code that calls current() or is it a design
> principle that it cannot be called?
>

Normally no, you can't - IRQ handlers are called from system context, not user
context, and are in no way associated to any process.

-- 
Francis Galiegue, fg@mandrakesoft.com
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race"  -- R. Cook

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:12 EST