[ECOS] calling path questions, thanks.

Qiang Huang jameshq@hotmail.com
Fri Sep 29 13:19:00 GMT 2006


Hi all:
    I am trying to understand (actuall studying) the internal of context 
switching for the ARM target. What I have figured out (but not really sure 
about it, hopfully anybody can correct me if it were wrong).

For the following circumstance:
Thread 1 is running and issue a SWI, when inside "software_interrupt from 
vectors.s", an IRQ occurs then uP will run the IRQ code and eventually runs 
into interrupt_end which would possibly cause a context switching (say 
switch from thread 1 to thread 2), when return "hal_thread_switch_context" 
thread 2 will be loadded and run, but how are SWI? is SWI be preempted by 
thread 2 and only get the chance to continue when uP is switched back to 
thread 1? Am I making any mistake here?

( Stack usage questions:
Is SWI using thread level stack after invoking of "call_exception_handler"?
)


Also while reading the code I found difficulties in understanding saving of 
pre-exception mode registers?

If supervisor mode is the prefer mode for execution (though IRQs will run a 
porption of code segment in IRQs mode it will switched to supervisor mode as 
soon as it can) isn't the pre-exception mode is always the supervisor mode?

Is there any possibilities to get a calling graph during context 
switching(ref link/doc)?
(for instance: thread 1 is running and issue a SWI command then IRQ occurs 
and thread 2 is made to run as the next ready thread.)

Please forgive me if I am asking the wrong question.

Thanks a lot.

_________________________________________________________________
Windows Live™ Messenger has arrived. Click here to download it for free! 
http://imagine-msn.com/messenger/launch80/?locale=en-gb


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list