This is the mail archive of the ecos-discuss@sourceware.org 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: Re: ISR not causing an DSR in some rare conditions


Jay Foster <jay@systech.com> writes:
> It seems troubling to me that the context switching code does not save and
> restore all registers.  Any register(s) not saved and restored by the
> context switching code could not be used anywhere, since you would never
> know when a context switch occurred, clobbering the registers.  I agree that
> from the point of view of the ARM ABI this is acceptable, since you know
> when you called another function, but this is not so for context switches.
> I suspect that there is something else going on here, of which I am
> ignorant.

Yes, something else indeed happens here. What you miss is that context
switch, when it is asynchronous, is called from the interrupt handler
that itself saves and then restores (some of) the registers. Thus,
interrupt routines can save only those registers that "C" routines
called from them would modify, and context switch could save only those
that are to be saved by the functions being called according to the ABI.

-- Sergei.

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


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