lkml.org 
[lkml]   [2000]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Calling current() from interrupt context
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/

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.203 / U:1.336 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site