mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +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())
|
||||
{
|
||||
// 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user