This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/SYSBIOS: What is meant by Context Save and Context Restore in TI ROTS Interrupts?

Part Number: SYSBIOS

Tool/software: TI-RTOS

Hi,

Recently I have started following some TI RTOS tutorials which explain about the SYS BIOS. However, in the HWi tutorial, there was mentioned about something called Context save and Context restore which is bit confusing concept for me. 

Can any one explain me what is this context save/restore concept and how it is going to affect to the interrupts particularly with ISR?

Thank you,

  • When an interrupt is serviced by the SYS/BIOS Hwi module, the code thread that was interrupted needs to continue execution after the ISR is serviced with a CPU state identical to the CPU state that existed when the interrupt occurred. Since the ISR changes the state of the CPU, the Hwi module will save the current state at the time of the interrupt and then restore this state when it returns to the code that was interrupted. This "CPU state" is what is referred to as the "context". This context is stored on the stack that is being used at the time of the interrupt.

    Regards,

    - Rob