This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: why need to call Cyg_Scheduler::get_current_thread()->set_saved_context(regs) in interrupt_end()?
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Qiang Huang" <jameshq at liverpool dot ac dot uk>
- Cc: "Ecos-Discuss" <ecos-discuss at sources dot redhat dot com>
- Date: 01 Oct 2002 18:43:58 +0100
- Subject: Re: [ECOS] why need to call Cyg_Scheduler::get_current_thread()->set_saved_context(regs) in interrupt_end()?
- References: <BDEPKKELILOKGOAOMONOOECICAAA.jameshq@liv.ac.uk>
"Qiang Huang" <jameshq@liverpool.ac.uk> writes:
> Q1:
> Is the context for the thread is saved by the calling to the pending dsr()?
> so will those context save be overlapped? or maybe I went to the wrong way.
> Thanks
>
I'm not sure what you are asking here.
> Q2:
> If this is needed in interrupt_end() so when I implememting the assembly
> code for interrupt handling which context do I need to save? context in the
> interrupt or the context before entering the interrupt?
>
The interrupt VSR must save the state of the interrupted code so it
can be restarted transparently later. But again, I am not sure I
actually understand what you are asking here.
The call to set_saved_context() is for debugging purposes only, as the
comment and ifdef surrounding it imply. It just saves a pointer to the
saved interrupt context so that the thread debug code can find it.
--
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss