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.

Difference beetween GateAll and GateHwi in SYSBIOS

Other Parts Discussed in Thread: SYSBIOS, TMS320C6748

hat is the difference beetween these 2 kinds of gates. In the documentation, I understand that in the 2 cases, interrupts are disables when entering the gate to lock resource. I would like to have the most general critical section to share resource beetween tasks or beetween task and hardware interrupts. But, if I use GateAll from a task, would all the interrupts be blocked until the resource is released by the interrupt ?

I use Sysbios 6.32 on TMS320C6748 DSP

  • Hi A BONNET,

    The difference can be seen in when comparing each module's "_enter" and "_exit" functions.

    GateHwi_enter() will globally disable interrupts by calling Hwi_disable(). GateHwi_exit() calls Hwi_restore()

    GateAll_enter() will call both Hwi_disable() and Swi_disable(). GateAll_exit() calls  Swi_restore() and Hwi_restore()

    Steve

  • Hi Steve,

    My apologies for popping up an ancient thread, but I have the exact same question and don't fully understand your answer.

    As far as I understand Swi can't happen while Hwi is disabled. So why would one possibly want to disable them explicitly?

    Can you please provide an example in which GateAll can be used but GateHwi can not?

    Best,
    Vasili