SPARC Context Switch Code

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Feb 6 12:38:28 UTC 2014


On 2014-02-06 13:31, Ahlendorf, Falk wrote:
>> The only valid invocation places for _CPU_Context_switch() are
>> >_Thread_Dispatch() and _Thread_Start_multitasking().
> _Thread_Dispatch() can also be called by a clock interrupt,
> which can just happen anywhere in your program and not necessarily
> at the point of a function call.
>
> So the call to _Thread_Dispatch happens at a random location and
> therefore also the call to _CPU_Context_switch.

Lets suppose _Thread_Dispatch() can happen at a random locations (which is not 
true in RTEMS), then shouldn't this function save the volatile registers 
(instead of _CPU_Context_switch())?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list