This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: context switching in ecos
- To: Suet Fei Li <suetfei at bwrc dot eecs dot berkeley dot edu>
- Subject: Re: [ECOS] context switching in ecos
- From: Jesper Skov <jskov at redhat dot com>
- Date: 09 Oct 2000 09:40:36 +0200
- Cc: "'ecos-discuss at sourceware dot cygnus dot com'" <ecos-discuss at sourceware dot cygnus dot com>
- References: <711F6B80B5B4D211BA900090272AB7649DB357@noyce.eecs.berkeley.edu>
>>>>> "Suet" == Suet Fei Li <suetfei@bwrc.eecs.berkeley.edu> writes:
Suet> It seems to me that the current status of the CPU has to be
Suet> saved twice (once right after the interrupt, the second time
Suet> during HAL_THREAD_SWITCH_CONTEXT ). If this is indeed true,
Suet> isn't it rather inefficient? Why did not it just:
Suet> interrupt -> save everything on the current thread -> scheduler
Suet> -> load the context from next thread.
What should happen is that in the VSR all registers that are marked
volatile on calls should be saved. The context switch function should
only save non-volatile registers.
On some architectures, however, there's no (or little) distinction
between the two sets. x86 is probably the worst architecture in this
regard, while most RISC architectures will have two destinct sets.
Jesper