RTOSAdap_genCriticalSectionBegin

Generates the code for entering the critical section. All code inside the critical section is protected against interrupting by any interrupt. It is typically implemented as disabling of interrupts.

Note: If reentrancy of methods (see RTOSAdap_genReentrantMethodBegin()) is handled by disabling interrupts, and if methods are required to be reentrant, code may not be generated. The generated code must be in pair with the code generated by RTOSAdap_genCriticalSectionEnd(). The critical section must always be dynamically nested within the code generated by RTOSAdap_genReentrantMethodBegin()/ End() (even if reentrant methods are not required).
Note: It is supported that critical sections can be dynamically nested. For example, a method can be called containing critical section from different critical section.