<div dir="ltr">Hi,<div><br></div><div>When the CPU issues an interrupt, and when the interrupt is processed, where does it run the code from? Is there a place where the commands are written based on the interrupt number? </div><div><br></div><div>I followed the call to  <a href="https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/schedulersmpimpl.h#n660">_Scheduler_SMP_Allocate_processor_exact</a>, which calls :</div><div><span style="color:rgb(0,0,0);font-size:13.3333px"><a href="https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/threadimpl.h#n1207">_Thread_Dispatch_update_heir</a> -> </span><a href="https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/threaddispatch.h#n247">_Thread_Dispatch_request</a> which calls _CPU_SMP_Send_interrupt(), the implementation of which is bsp dependent:</div><div><br></div><div>on <a href="https://git.rtems.org/rtems/tree/bsps/arm/shared/start/arm-a9mpcore-smp.c#n58">arm a9</a></div><div>on <a href="https://git.rtems.org/rtems/tree/bsps/arm/raspberrypi/start/bspsmp.c#n73">raspberry pi</a></div><div>on <a href="https://git.rtems.org/rtems/tree/bsps/i386/pc386/start/bspsmp.c#n66">i386</a></div><div>and so on...</div><div></div><div><br></div><div>So, can someone please help me know what gets executed right after the interrupt is accepted by the CPU from the IRQ? Can someone point me to the source code - where the CPU possibly checks the value of heir and does a context switch?</div><div><br></div><div>Thanks!  </div></div>