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: stack switching in step (4) (5) (6) for previous question http://sources.redhat.com/ml/ecos-discuss/2002-09/msg00224.html??


"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


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