This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Thread identification
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Michele Portolan <michele dot Portolan at imag dot fr>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 27 May 2003 13:10:20 +0200
- Subject: Re: [ECOS] Thread identification
- References: <00a301c32432$e0038e40$9881ab93@imag.fr>
On Tue, May 27, 2003 at 11:32:21AM +0200, Michele Portolan wrote:
> Is it possible from an ISR to understand which thread was running when the
> interruption occurred?
cyg_thread_self() should return the current thread. I don't know what
happens if you where in an DSR or another ISR when the ISR went
off.
Also not this function is not documented as being callable in an
ISR. It should work with the current sources, but there is no guarantee
it will continue to work forever.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss