OS_EnterCriticalSection ()
Enter critical section. Current values of GIEx are stored in internal system variable. All interrupts are disabled. All tasks except current will be paused. You can still switch to the scheduler.
Only in task
None
nothing
void Task (void) { for (;;) { /*...*/ OS_EnterCriticalSection(); /* make critical operations */ /*...*/ OS_LeaveCriticalSection(); /*...*/ } }