[ECOS] R: [ECOS] Thread identification

Michele Portolan michele.Portolan@imag.fr
Tue May 27 12:58:00 GMT 2003


I'm conducting a study on fault tolerance, so I need to know which thread
had been interrupted to try to recover the error.
Does cyg_thread_self works also inside an exception?

----- Original Message -----
From: Nick Garnett <nickg@ecoscentric.com>
To: Michele Portolan <michele.Portolan@imag.fr>
Cc: <ecos-discuss@sources.redhat.com>
Sent: Tuesday, May 27, 2003 12:00 PM
Subject: Re: [ECOS] Thread identification


> "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



More information about the Ecos-discuss mailing list