Просмотр исходного кода

Merge branch 'bugfix/yield_other_core_prio_check_fix' into 'master'

Fix interrupting task on other CPU that has lower prio than current task on current CPU

Fix for a very subtle bug introduced somewhere in december. This bug would cause a cross-core interrupt to only be sent if the activated task has a higher priority than the task currently running on *this* cpu, instead of on the other CPU.

See merge request !475

Jeroen Domburg 9 лет назад
Родитель
Сommit
c61fdff729
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      components/freertos/tasks.c

+ 1 - 1
components/freertos/tasks.c

@@ -632,7 +632,7 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB, TaskFunction_t pxTaskCode
 */
 void taskYIELD_OTHER_CORE( BaseType_t xCoreID, UBaseType_t uxPriority )
 {
-	TCB_t *curTCB = xTaskGetCurrentTaskHandle();
+	TCB_t *curTCB = pxCurrentTCB[xCoreID];
 	BaseType_t i;
 
 	if (xCoreID != tskNO_AFFINITY) {