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