During an x86 software interrupt, when exactly is a context switch made?

前端 未结 1 1947
时光取名叫无心
时光取名叫无心 2021-01-22 13:32

I am asking this because I am trying to implement interrupts in my toy kernel. So, I know that when an interrupt occurs, the CPU pushes various bits of information onto the stac

相关标签:
1条回答
  • 2021-01-22 14:19

    Just take the Intel Manual 3 and read:

    • Chapter 6 INTERRUPT AND EXCEPTION HANDLING
    • Section 5.8.5 Stack Switching
    • 5.8.6 Returning from a Called Procedure.

    This is what is pushed on an interrupt

    Keep in in mind that interrupt are handled with Task Gates, Trap gates and Interrupt gates, each one with different semantic and the last two very close to Call gates.

    0 讨论(0)
提交回复
热议问题