Where the program counter goes after returning the interrupt handler?

前端 未结 4 1062
名媛妹妹
名媛妹妹 2020-12-18 11:59

Hi I am wondering where the program counter goes when the program returns from interrupt service routine? I know when the interrupt event occurs the PC is pushed into the st

4条回答
  •  梦毁少年i
    2020-12-18 12:03

    Exact behaviour of interrupts are hardware-specific, but the CPU will simply wait until first_instruction is finished. After that, it will push CPU state onto stack (or save it in other way) and start ISR. That means that your ISR will not be executed immediately - there is a tiny delay, which may become an issue in hard realtime applications.

提交回复
热议问题