This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: why need to call Cyg_Scheduler::get_current_thread()->set_saved_context(regs) in interrupt_end()?


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]