0 Replies Latest reply on Aug 8, 2012 1:41 PM by barry_sellew

    What is the difference between NU_Local_Control_Interrupts() and NU_Control_Interrupts()?

    barry_sellew

      NU_Local_Control_Interrupts() manages interrupts on a local level. It means the interrupt condition is predicated on a task. For example, if a thread disables interrupts, they are only disabled while the task is running. If it suspends, then the interrupt condition will revert to the global setting when control is passed to the next ready task. Interrupts are enabled/disabled in a subroutine dependent manner. All interrupts will be disabled using this call, but that "disabling" will be confined to the scope of that particular task. Outside that it will not hold.

      NU_Control_Interrupts() manages interrupts globally. That is, regardless of the thread that is executing, interrupts maintain the condition set by the global interrupt lockout mechanism. Interrupts disabled by this call remain disabled until enabled explicitly. This means that, if interrupts are disabled by the call, unless subsequent tasks are aware of the interrupt posture (through some system design mechanism), interrupts will be disabled until a task in the system enables them.