[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a2ebde260705151549r2762ac1fk9a68db7b903e6525@mail.gmail.com>
Date: Wed, 16 May 2007 06:49:16 +0800
From: "Dong Feng" <middle.fengdong@...il.com>
To: "Phillip Susi" <psusi@....rr.com>
Cc: "pradeep singh" <2500.pradeep@...il.com>,
"Bahadir Balban" <bahadir.balban@...il.com>,
"Learning Linux" <learninglinux4@...il.com>,
kernelnewbies@...linux.org, linux-newbie@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: Why can't we sleep in an ISR?
2007/5/16, Phillip Susi <psusi@....rr.com>:
> Dong Feng wrote:
> >> Doesn't it run in current process's context ?
> >>
> >
> > No. I think the concept of process context is a higher-level logical
> > concept. Though the interrupt share stack with the interrupted
> > process, in my opinion it logically does not share the context with
> > the process.
>
> No, the term context here has a specific meaning. It refers to those
> things which flow from the current pointer, including the virtual memory
> space, file descriptor table, current uid, and so forth. Because the
> current pointer is not changed on entry to an ISR, the ISR is executing
> in the context of the interrupted process, and thus uses that process'
> virtual memory, etc.
>
If what you say were true, then an ISR would be running in the same
context as the interrupted process. But please check any article or
book, it will say ISR running in different context from any process.
So ISR is considered in its own context, although it shares a lot of
things with the interrupted process. I would only say *context* is a
higher-level logical concept.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists