auto-sync

This commit is contained in:
rusEfi 2016-09-03 22:01:51 -04:00
parent 052a05d6dd
commit 439ac6d545
2 changed files with 11 additions and 4 deletions

View File

@ -111,6 +111,7 @@ int EventQueue::executeAll(efitime_t now) {
scheduling_s * current, *tmp;
scheduling_s * executionList = NULL;
scheduling_s * lastInExecutionList = NULL;
int listIterationCounter = 0;
int executionCounter = 0;
@ -127,7 +128,13 @@ int EventQueue::executeAll(efitime_t now) {
efiAssert(head == current, "removing from head", -1);
//LL_DELETE(head, current);
head = head->next;
LL_PREPEND(executionList, current);
if (executionList == NULL) {
lastInExecutionList = executionList = current;
} else {
lastInExecutionList->next = current;
lastInExecutionList = current;
}
current->next = NULL;
} else {
/**
* The list is sorted. Once we find one action in the future, all the remaining ones

View File

@ -85,13 +85,13 @@ static void testSignalExecutor2(void) {
}
static int prevValue = 5;
static long prevValue = -1;
static void orderCallback(void *a) {
int value = (int)a;
long value = (long)a;
printf("value=%d prevValue=%d\r\n", value, prevValue);
assertTrueM("orderCallback", value < prevValue);
assertTrueM("orderCallback", value > prevValue);
prevValue = value;
}