How does context switching work?
Richi Dubey
richidubey at gmail.com
Sat Oct 31 15:50:23 UTC 2020
Hi,
I want to learn more about how context switching works in RTEMS. I saw the
following lines in theaddispatch.c:
_Thread_Save_fp( executing );
_Context_Switch( &executing->Registers, &heir->Registers );
_Thread_Restore_fp( executing );
I do not understand how it works. Here, the executing process saves its
context by calling _Thread_Save_fp( executing ), then if a different
process resumes execution after the context switch, why does it get the
context of previous process (executing)?
Can someone help me learn more about this?
Thanks,
Richi.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201031/618e743e/attachment.html>
More information about the devel
mailing list