This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: stack switching in step (4) (5) (6) for previous question http://sources.redhat.com/ml/ecos-discuss/2002-09/msg00224.html??
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Qiang Huang" <jameshq at liverpool dot ac dot uk>
- Cc: "Sandeep" <sandeep at codito dot com>, "Ecos-Discuss" <ecos-discuss at sources dot redhat dot com>
- Date: 23 Sep 2002 18:38:40 +0100
- Subject: Re: [ECOS] stack switching in step (4) (5) (6) for previous question http://sources.redhat.com/ml/ecos-discuss/2002-09/msg00224.html??
- References: <BDEPKKELILOKGOAOMONOMEBLCAAA.jameshq@liv.ac.uk>
"Qiang Huang" <jameshq@liverpool.ac.uk> writes:
> Hi nick:
> Thanks for your helpful post.
> I just wonder **where** and how are those step (4)-switch to thread stack,
> (5)- switch back to thread stack, (6)-switch to interrupt stack implemented
> in ecos?
>
> It seems in ecos the only place we can access the stack point(in assembly
> code) is vector.S (the place when enter interrupt)and context.S (the place
> when switch the context). So When "Request DSR run" (end of
> Cyg_RealTimeClock::isr())how can we switch the stack from interrupt stack to
> user thread stack(Isn't that should be changed in assembly code?)?
It is, there is a call from the kernel DSR handling code to an
optional HAL assembler routine to do this.
>
> for step (5), before entering the HAL_THREAD_SWITCH_CONTEXT() in
> Cyg_Scheduler::unlock_inner() how can we change the stack back to "switch
> back to thread stack" without using the assembly code?
>
See my other answers on this subject elsewhere for more detail.
--
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