SchedulerDelayCounter_t CurrentTickValue_LCL;
SchedulerDelayCounter_t DelayCounter_LCL;
- ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
- {
- CurrentTickValue_LCL = Scheduler_TickCounter;
- }
+ uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
+ GlobalInterruptDisable();
+
+ CurrentTickValue_LCL = Scheduler_TickCounter;
+
+ SetGlobalInterruptMask(CurrentGlobalInt);
DelayCounter_LCL = *DelayCounter;