<div dir="ltr">Thanks, I'll check them out. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 13, 2020 at 12:56 AM Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Aug 12, 2020 at 11:33 AM Utkarsh Rai <<a href="mailto:utkarsh.rai60@gmail.com" target="_blank">utkarsh.rai60@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
> I have been testing my code for thread stack isolation against various tests( Some written by me, and remaining already present). One of the limitations that I have found is that I encounter fatal errors whenever a context switch takes place through an ISR. Can you please explain how the context switching procedure works when an interrupt occurs. When I use gdb for stepping through the code it asynchronously moves to context switching code from the executing thread( for example psx16 test).<br>
> For thread stack protection, the part that deals with context switching simply 'sets 'the memory entries of the heir stack and 'unsets' that of the executing stack.<br>
<br>
There are two issues to start: interrupt stacks and dispatching from an ISR.<br>
<br>
I think you can start by reading some of the documentation:<br>
<a href="https://docs.rtems.org/branches/master/c-user/interrupt_manager.html#processing-an-interrupt" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/c-user/interrupt_manager.html#processing-an-interrupt</a><br>
<br>
<a href="https://docs.rtems.org/branches/master/c-user/scheduling_concepts.html#dispatching-tasks" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/c-user/scheduling_concepts.html#dispatching-tasks</a><br>
<br>
<a href="https://docs.rtems.org/branches/master/c-user/config/general.html#configure-interrupt-stack-size" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/c-user/config/general.html#configure-interrupt-stack-size</a><br>
<br>
<a href="https://docs.rtems.org/branches/master/cpu-supplement/port.html#interrupt-processing" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/cpu-supplement/port.html#interrupt-processing</a><br>
<br>
You can also find some material in rtems-docs.git/porting -- I don't<br>
know where that gets generated.<br>
<br>
Continue to ask questions, and writing blog posts.<br>
</blockquote></div>