X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/28a1ee29a1a200c8e8c76355a9036a7456425bc3..77a9df36a77d2523dd2bc24fa17f9f04c6c175c5:/LUFA/Scheduler/Scheduler.h diff --git a/LUFA/Scheduler/Scheduler.h b/LUFA/Scheduler/Scheduler.h index 7aa513322..262218683 100644 --- a/LUFA/Scheduler/Scheduler.h +++ b/LUFA/Scheduler/Scheduler.h @@ -219,10 +219,12 @@ ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE; static inline void Scheduler_ResetDelay(SchedulerDelayCounter_t* const DelayCounter) { - ATOMIC_BLOCK(ATOMIC_RESTORESTATE) - { - *DelayCounter = Scheduler_TickCounter; - } + uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask(); + GlobalInterruptDisable(); + + *DelayCounter = Scheduler_TickCounter; + + SetGlobalInterruptMask(CurrentGlobalInt); } /* Function Prototypes: */