mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-02 14:22:55 +03:00
schedule: fix linked-list (per @dok-net review) (#6147)
This commit is contained in:
@ -120,10 +120,12 @@ void run_scheduled_functions()
|
||||
{
|
||||
if (toCall->mFunc())
|
||||
{
|
||||
// function stays in list
|
||||
lastRecurring = toCall;
|
||||
}
|
||||
else
|
||||
{
|
||||
// function removed from list
|
||||
InterruptLock lockAllInterruptsInThisScope;
|
||||
|
||||
if (sFirst == toCall)
|
||||
@ -137,6 +139,9 @@ void run_scheduled_functions()
|
||||
recycle_fn_unsafe(toCall);
|
||||
}
|
||||
}
|
||||
else
|
||||
// function stays in list
|
||||
lastRecurring = toCall;
|
||||
}
|
||||
|
||||
fence = false;
|
||||
|
Reference in New Issue
Block a user