This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Register window question for Sparc. Thank you very very much.
- From: "Qiang Huang" <jameshq at liverpool dot ac dot uk>
- To: "Ecos-Discuss \(E-mail\)" <ecos-discuss at sources dot redhat dot com>
- Date: Mon, 16 Sep 2002 09:24:34 +0100
- Subject: [ECOS] Register window question for Sparc. Thank you very very much.
Dear all:
I was stuck for a week in understanding the context switching for sparc
target. Could anyone please give me some help on this? Thank you very very
much.
Q1: when hal_thread_switch_context(callee) (context.S) is called by caller
will a new register window opened? if so the %l and %i in
hal_thread_switch_context are not the registers set appeared in the old
thread, but why they are saved in hal_thread_switch_context?
And from where suspend the old thread to where hal_thread_switch_context is
called how can I know how many register windows have already been openned?
(for each function call, a new register window will be openned is this
right? if so maybe when the comes to hal_thread_switch_context some register
windows have already been openned, but we need to save the state of the old
thread)
Q2: When the program starts and comes to an interrupt which stack will be
used? (Does each thread use its own stack (passed as parameter when call
cyg_thread_creat( xxx ) function ??) If the timer interrupt then which stack
will be used?
Thanks a lot
Best regards!
qiang
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss