If a function wants to protect itself against reentrancy, is it enough to simply disable HWI? Will that automatically disable SWIs and TSKs as well?
In other words, do I need to do this:
TSK_disable();
SWI_enable();
oldmask = HWI_disable();
...... critical section ........
HWI_restore(oldmask);
SWI_enable();
TSK_enable();