Benjamin ZORES wrote:
> Philippe Gerum a écrit :
>> See arch/powerpc/switch_32.S, rthal_switch_threads(), for the part that does 
>> the
>> actual stack switching.
>>
>> Note that this code is obfuscated by the fact that we have to handle 
>> so-called
>> "hybrid" switching, between Xenomai kernel threads (which do not rely on a
>> task_struct), and Linux tasks (Xenomai userland, Linux kthreads, or regular
>> userland Linux). Fortunately, what is saved on the stack in any case is easy 
>> to
>> find out.
>>   
> Thx for the info.
> Can you tell me why GPR registers would be saved there and FPU ones in 
> another function ?
> 

Because FPU management with Xenomai involves additional handling, e.g. FPU state
fixup during primary/secondary mode switch, Linux to Xenomai real-time
transitions. That support has to be provided independently from the pure task
switching code.

-- 
Philippe.

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to