auto-sync

This commit is contained in:
rusEfi 2015-04-16 12:05:50 -04:00
parent 76690cdfe8
commit dbd4aff103
2 changed files with 5 additions and 4 deletions

View File

@ -89,16 +89,17 @@ bool EventQueue::executeAll(uint64_t now) {
scheduling_s * executionList = NULL; scheduling_s * executionList = NULL;
int counter = 0; int listIterationCounter = 0;
int executionCounter = 0;
// we need safe iteration because we are removing elements inside the loop // we need safe iteration because we are removing elements inside the loop
LL_FOREACH_SAFE(head, current, tmp) LL_FOREACH_SAFE(head, current, tmp)
{ {
if (++counter > QUEUE_LENGTH_LIMIT) { if (++listIterationCounter > QUEUE_LENGTH_LIMIT) {
firmwareError("Is this list looped?"); firmwareError("Is this list looped?");
return false; return false;
} }
if (current->momentX <= now) { if (current->momentX <= now) {
executionCounter++;
LL_DELETE(head, current); LL_DELETE(head, current);
LL_PREPEND(executionList, current); LL_PREPEND(executionList, current);
} }

View File

@ -290,5 +290,5 @@ int getRusEfiVersion(void) {
return 123; // this is here to make the compiler happy about the unused array return 123; // this is here to make the compiler happy about the unused array
if (UNUSED_CCM_SIZE[0] * 0 != 0) if (UNUSED_CCM_SIZE[0] * 0 != 0)
return 3211; // this is here to make the compiler happy about the unused array return 3211; // this is here to make the compiler happy about the unused array
return 20150415; return 20150416;
} }