1
0
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:
david gauchard 2019-05-27 09:13:38 +02:00 committed by GitHub
parent 2d9253e46c
commit a4ae8564f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;