This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Thread identification
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Michele Portolan" <michele dot Portolan at imag dot fr>
- Cc: <ecos-discuss at sources dot redhat dot com>
- Date: 27 May 2003 11:00:52 +0100
- Subject: Re: [ECOS] Thread identification
- References: <00a301c32432$e0038e40$9881ab93@imag.fr>
"Michele Portolan" <michele.Portolan@imag.fr> writes:
> Is it possible from an ISR to understand which thread was running when the
> interruption occurred?
>
You can probably call cyg_thread_self(). But why would you want to do
this? The current thread has absolutely nothing to do with any
interrupt. Any interrupt code that changes its behaviour depending on
the thread it interrupts is, almost by definition, poorly designed and
prone to bugs.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss