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/AWR1642: asm code for context switch protection in R4F

Part Number: AWR1642

Tool/software: TI-RTOS

Hi champion,
    Where can we find the R4F assemble code for OS related operation like task switching context protection?

Thanks,
Adam

  • Hello Adam,
    If you are looking for code to protect some region of application flow from context/Task switching, then in the application itself you need to disable interrupt around the critical section to avoid any switching.
    /* Critical Section: We record the spawn function which is to be executed */
    key = Hwi_disable();
    ....
    /* Critical section that needs to be protected from Task switch */
    Hwi_restore (key);


    One of the e2e thread might help here-
    e2e.ti.com/.../148254

    Regards,
    Jitendra