Lines Matching full:if

51 #if ( configUSE_STATS_FORMATTING_FUNCTIONS == 1 )
60 #if ( configUSE_PREEMPTION == 0 )
62 /* If the cooperative scheduler is being used then a yield should not be
68 #if ( configNUMBER_OF_CORES == 1 )
82 if( pxCurrentTCB->uxPriority < ( pxTCB )->uxPriority ) \
92 #else /* if ( configNUMBER_OF_CORES == 1 ) */
97 /* Yield for the task if a running task has priority lower than this task. */
100 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */
102 #endif /* if ( configUSE_PREEMPTION == 0 ) */
120 /* If any of the following are set then task stacks are filled with a known
121 * value so the high water mark can be determined. If none of the following are
123 #if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) || ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_uxTa…
152 #if ( configUSE_PORT_OPTIMISED_TASK_SELECTION == 0 )
154 /* If configUSE_PORT_OPTIMISED_TASK_SELECTION is 0 then task selection is
162 if( ( uxPriority ) > uxTopReadyPriority ) \
170 #if ( configNUMBER_OF_CORES == 1 )
187 #else /* if ( configNUMBER_OF_CORES == 1 ) */
191 #endif /* if ( configNUMBER_OF_CORES == 1 ) */
203 /* If configUSE_PORT_OPTIMISED_TASK_SELECTION is 1 then task selection is
224 /* A port optimised version is provided, call it only if the TCB being reset
225 * is being referenced from a ready list. If it is referenced from a delayed
229if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ ( uxPriority ) ] ) ) == ( UBaseType_t ) 0 ) \
274 * see if the parameter is NULL and returns a pointer to the appropriate TCB.
286 #if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
300 /* Returns pdTRUE if the task is actively running and not scheduled to yield. */
301 #if ( configNUMBER_OF_CORES == 1 )
312 #if ( ( configNUMBER_OF_CORES > 1 ) && ( portCRITICAL_NESTING_IN_TCB == 1 ) )
317 #endif /* #if ( ( configNUMBER_OF_CORES > 1 ) && ( portCRITICAL_NESTING_IN_TCB == 1 ) ) */
321 #if ( configNUMBER_OF_CORES > 1 )
328 if( ( xCoreID ) == ( BaseType_t ) portGET_CORE_ID() ) \
335 /* Request other core to yield if it is not requested before. */ \
336 if( pxCurrentTCBs[ ( xCoreID ) ]->xTaskRunState != taskTASK_SCHEDULED_TO_YIELD ) \
343 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
355 #if ( portUSING_MPU_WRAPPERS == 1 )
359 #if ( configUSE_CORE_AFFINITY == 1 ) && ( configNUMBER_OF_CORES > 1 )
367 #if ( configNUMBER_OF_CORES > 1 )
368 …xTaskRunState; /**< Used to identify the core the task is running on, if the task is running.…
373 #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
377 #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
381 #if ( portCRITICAL_NESTING_IN_TCB == 1 )
385 #if ( configUSE_TRACE_FACILITY == 1 )
390 #if ( configUSE_MUTEXES == 1 )
395 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
399 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
403 #if ( configGENERATE_RUN_TIME_STATS == 1 )
407 #if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 )
411 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
418 #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 )
419 …uint8_t ucStaticallyAllocated; /**< Set to pdTRUE if the task is a statically allocated to ensure …
422 #if ( INCLUDE_xTaskAbortDelay == 1 )
426 #if ( configUSE_POSIX_ERRNO == 1 )
435 #if ( configNUMBER_OF_CORES == 1 )
459 #if ( INCLUDE_vTaskDelete == 1 )
466 #if ( INCLUDE_vTaskSuspend == 1 )
474 #if ( configUSE_POSIX_ERRNO == 1 )
497 * lists the xStateListItem can be referenced from, if the scheduler is suspended.
498 * If an interrupt needs to unblock a task while the scheduler is suspended then it
509 #if ( configGENERATE_RUN_TIME_STATS == 1 )
527 #if ( configNUMBER_OF_CORES > 1 )
530 * Checks to see if another task moved the current task out of the ready
531 * list while it was waiting to enter a critical section and yields, if so.
534 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
536 #if ( configNUMBER_OF_CORES > 1 )
539 * Yields a core, or cores if multiple priorities are not allowed to run
543 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
545 #if ( configNUMBER_OF_CORES > 1 )
551 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
554 * Utility task that simply returns pdTRUE if the task referenced by xTask is
555 * currently in the Suspended state, or pdFALSE if the task referenced by xTask
558 #if ( INCLUDE_vTaskSuspend == 1 )
587 #if ( configNUMBER_OF_CORES > 1 )
598 #if ( INCLUDE_vTaskDelete == 1 )
605 * Used only by the idle task. This checks to see if anything has been placed
606 * in the list of tasks waiting to be deleted. If so the task is cleaned up
626 #if ( configUSE_TRACE_FACILITY == 1 )
636 * the task if it is found, or NULL if the task is not found.
638 #if ( INCLUDE_xTaskGetHandle == 1 )
650 #if ( ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) || ( INCLUD…
665 #if ( configUSE_TICKLESS_IDLE != 0 )
677 #if ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 )
709 * the task if it is created successfully. Otherwise, returns NULL.
711 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
720 #endif /* #if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
724 * a handle to the task if it is created successfully. Otherwise, returns NULL.
726 #if ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
729 #endif /* #if ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) */
733 * for TCB. Returns a handle to the task if it is created successfully. Otherwise,
736 #if ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
739 #endif /* #if ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) */
743 * the task if it is created successfully. Otherwise, returns NULL.
745 #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
752 #endif /* #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */
755 * freertos_tasks_c_additions_init() should only be called if the user definable
765 #if ( configUSE_PASSIVE_IDLE_HOOK == 1 )
767 #endif /* #if ( configUSE_PASSIVE_IDLE_HOOK == 1 ) */
769 #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) )
781 * number of characters that would have been written if the
794 #endif /* #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) )…
797 #if ( configNUMBER_OF_CORES > 1 )
812 /* We are only here if we just entered a critical section in prvCheckForRunStateChange()
813 * or if we just suspended the scheduler, and another task in prvCheckForRunStateChange()
819 * if our state changed again during the reacquisition. */ in prvCheckForRunStateChange()
822 if( uxPrevCriticalNesting > 0U ) in prvCheckForRunStateChange()
841 * service the pending interrupt and yield. If the run state is still in prvCheckForRunStateChange()
851 if( uxPrevCriticalNesting == 0U ) in prvCheckForRunStateChange()
857 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
861 #if ( configNUMBER_OF_CORES > 1 )
869 #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) in prvYieldForTask()
871 #endif /* #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) */ in prvYieldForTask()
876 #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) in prvYieldForTask()
878 /* No task should yield for this one if it is a lower priority in prvYieldForTask()
880 if( pxTCB->uxPriority >= uxTopReadyPriority ) in prvYieldForTask()
883 if( taskTASK_IS_RUNNING( pxTCB ) == pdFALSE ) in prvYieldForTask()
888 /* xLowestPriorityToPreempt will be decremented to -1 if the priority of pxTCB in prvYieldForTask()
897 if( ( pxCurrentTCBs[ xCoreID ]->uxTaskAttributes & taskATTRIBUTE_IS_IDLE ) != 0U ) in prvYieldForTask()
902if( ( taskTASK_IS_RUNNING( pxCurrentTCBs[ xCoreID ] ) != pdFALSE ) && ( xYieldPendings[ xCoreID ] … in prvYieldForTask()
904 #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) in prvYieldForTask()
905 if( taskTASK_IS_RUNNING( pxTCB ) == pdFALSE ) in prvYieldForTask()
908 if( xCurrentCoreTaskPriority <= xLowestPriorityToPreempt ) in prvYieldForTask()
910 #if ( configUSE_CORE_AFFINITY == 1 ) in prvYieldForTask()
911if( ( pxTCB->uxCoreAffinityMask & ( ( UBaseType_t ) 1U << ( UBaseType_t ) xCoreID ) ) != 0U ) in prvYieldForTask()
914 #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 ) in prvYieldForTask()
915 if( pxCurrentTCBs[ xCoreID ]->xPreemptionDisable == pdFALSE ) in prvYieldForTask()
929 #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) in prvYieldForTask()
933if( ( xCurrentCoreTaskPriority > ( ( BaseType_t ) tskIDLE_PRIORITY - 1 ) ) && in prvYieldForTask()
944 #endif /* #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) */ in prvYieldForTask()
952 #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) in prvYieldForTask()
953 if( ( xYieldCount == 0 ) && ( xLowestPriorityCore >= 0 ) ) in prvYieldForTask()
954 #else /* #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) */ in prvYieldForTask()
955 if( xLowestPriorityCore >= 0 ) in prvYieldForTask()
956 #endif /* #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) */ in prvYieldForTask()
961 #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) in prvYieldForTask()
963if( ( ( pxCurrentTCBs[ portGET_CORE_ID() ]->uxTaskAttributes & taskATTRIBUTE_IS_IDLE ) == 0U ) && in prvYieldForTask()
972 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
975 #if ( configNUMBER_OF_CORES > 1 )
982 #if ( configUSE_CORE_AFFINITY == 1 ) in prvSelectHighestPriorityTask()
985 #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) in prvSelectHighestPriorityTask()
1002 if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxCurrentTCBs[ xCoreID ]->uxPriority ] ), in prvSelectHighestPriorityTask()
1012 #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) in prvSelectHighestPriorityTask()
1014 if( uxCurrentPriority < uxTopReadyPriority ) in prvSelectHighestPriorityTask()
1024 if( listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxCurrentPriority ] ) ) == pdFALSE ) in prvSelectHighestPriorityTask()
1041 #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) in prvSelectHighestPriorityTask()
1046 if( uxCurrentPriority < uxTopReadyPriority ) in prvSelectHighestPriorityTask()
1048 if( ( pxTCB->uxTaskAttributes & taskATTRIBUTE_IS_IDLE ) == 0U ) in prvSelectHighestPriorityTask()
1054 #endif /* #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) */ in prvSelectHighestPriorityTask()
1056 if( pxTCB->xTaskRunState == taskTASK_NOT_RUNNING ) in prvSelectHighestPriorityTask()
1058 #if ( configUSE_CORE_AFFINITY == 1 ) in prvSelectHighestPriorityTask()
1059if( ( pxTCB->uxCoreAffinityMask & ( ( UBaseType_t ) 1U << ( UBaseType_t ) xCoreID ) ) != 0U ) in prvSelectHighestPriorityTask()
1062 /* If the task is not being executed by any core swap it in. */ in prvSelectHighestPriorityTask()
1064 #if ( configUSE_CORE_AFFINITY == 1 ) in prvSelectHighestPriorityTask()
1072 else if( pxTCB == pxCurrentTCBs[ xCoreID ] ) in prvSelectHighestPriorityTask()
1076 #if ( configUSE_CORE_AFFINITY == 1 ) in prvSelectHighestPriorityTask()
1077if( ( pxTCB->uxCoreAffinityMask & ( ( UBaseType_t ) 1U << ( UBaseType_t ) xCoreID ) ) != 0U ) in prvSelectHighestPriorityTask()
1091 if( xTaskScheduled != pdFALSE ) in prvSelectHighestPriorityTask()
1100 if( xDecrementTopPriority != pdFALSE ) in prvSelectHighestPriorityTask()
1103 #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) in prvSelectHighestPriorityTask()
1115 if( uxCurrentPriority > tskIDLE_PRIORITY ) in prvSelectHighestPriorityTask()
1127 #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) in prvSelectHighestPriorityTask()
1129 if( xTaskScheduled == pdTRUE ) in prvSelectHighestPriorityTask()
1131 if( xPriorityDropped != pdFALSE ) in prvSelectHighestPriorityTask()
1140 if( ( pxCurrentTCBs[ x ]->uxTaskAttributes & taskATTRIBUTE_IS_IDLE ) != 0U ) in prvSelectHighestPriorityTask()
1148 #endif /* #if ( configRUN_MULTIPLE_PRIORITIES == 0 ) */ in prvSelectHighestPriorityTask()
1150 #if ( configUSE_CORE_AFFINITY == 1 ) in prvSelectHighestPriorityTask()
1152 if( xTaskScheduled == pdTRUE ) in prvSelectHighestPriorityTask()
1154if( ( pxPreviousTCB != NULL ) && ( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxPreviousTCB->u… in prvSelectHighestPriorityTask()
1156 /* A ready task was just evicted from this core. See if it can be in prvSelectHighestPriorityTask()
1163 if( ( pxPreviousTCB->uxTaskAttributes & taskATTRIBUTE_IS_IDLE ) != 0U ) in prvSelectHighestPriorityTask()
1168 if( ( uxCoreMap & ( ( UBaseType_t ) 1U << ( UBaseType_t ) xCoreID ) ) != 0U ) in prvSelectHighestPriorityTask()
1204 if( ( uxCoreMap & ( ( UBaseType_t ) 1U << uxCore ) ) != 0U ) in prvSelectHighestPriorityTask()
1208if( ( pxCurrentTCBs[ uxCore ]->uxTaskAttributes & taskATTRIBUTE_IS_IDLE ) != 0U ) in prvSelectHighestPriorityTask()
1215 if( ( xTaskPriority < xLowestPriority ) && in prvSelectHighestPriorityTask()
1219 #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 ) in prvSelectHighestPriorityTask()
1220 if( pxCurrentTCBs[ uxCore ]->xPreemptionDisable == pdFALSE ) in prvSelectHighestPriorityTask()
1230 if( xLowestPriorityCore >= 0 ) in prvSelectHighestPriorityTask()
1237 #endif /* #if ( configUSE_CORE_AFFINITY == 1 ) */ in prvSelectHighestPriorityTask()
1244 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
1260 #if ( configASSERT_DEFINED == 1 ) in prvCreateStaticTask()
1271 if( ( pxTaskBuffer != NULL ) && ( puxStackBuffer != NULL ) ) in prvCreateStaticTask()
1282 #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) in prvCreateStaticTask()
1316 if( pxNewTCB != NULL ) in xTaskCreateStatic()
1318 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) in xTaskCreateStatic()
1338 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) )
1355 if( pxNewTCB != NULL ) in xTaskCreateStaticAffinitySet()
1371 #endif /* #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) */
1376 #if ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
1385if( ( pxTaskDefinition->puxStackBuffer != NULL ) && ( pxTaskDefinition->pxTaskBuffer != NULL ) ) in prvCreateRestrictedStaticTask()
1396 #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) in prvCreateRestrictedStaticTask()
1433 if( pxNewTCB != NULL ) in xTaskCreateRestrictedStatic()
1435 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) in xTaskCreateRestrictedStatic()
1456 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) )
1470 if( pxNewTCB != NULL ) in xTaskCreateRestrictedStaticAffinitySet()
1487 #endif /* #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) */
1492 #if ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
1500 if( pxTaskDefinition->puxStackBuffer != NULL ) in prvCreateRestrictedTask()
1507 if( pxNewTCB != NULL ) in prvCreateRestrictedTask()
1514 #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) in prvCreateRestrictedTask()
1551 if( pxNewTCB != NULL ) in xTaskCreateRestricted()
1553 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) in xTaskCreateRestricted()
1558 #endif /* #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) */ in xTaskCreateRestricted()
1575 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) )
1587 if( pxNewTCB != NULL ) in xTaskCreateRestrictedAffinitySet()
1605 #endif /* #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) */
1611 #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
1621 /* If the stack grows down then allocate the stack then the TCB so the stack in prvCreateTask()
1622 * does not grow into the TCB. Likewise if the stack grows up then allocate in prvCreateTask()
1624 #if ( portSTACK_GROWTH > 0 ) in prvCreateTask()
1634 if( pxNewTCB != NULL ) in prvCreateTask()
1640 * be deleted later if required. */ in prvCreateTask()
1646 if( pxNewTCB->pxStack == NULL ) in prvCreateTask()
1664 if( pxStack != NULL ) in prvCreateTask()
1672 if( pxNewTCB != NULL ) in prvCreateTask()
1693 if( pxNewTCB != NULL ) in prvCreateTask()
1695 #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) in prvCreateTask()
1724 if( pxNewTCB != NULL ) in xTaskCreate()
1726 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) in xTaskCreate()
1747 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) )
1763 if( pxNewTCB != NULL ) in xTaskCreateAffinitySet()
1780 #endif /* #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) */
1797 #if ( portUSING_MPU_WRAPPERS == 1 ) in prvInitialiseNewTask()
1801 if( ( uxPriority & portPRIVILEGE_BIT ) != 0U ) in prvInitialiseNewTask()
1812 /* Avoid dependency on memset() if it is not required. */ in prvInitialiseNewTask()
1813 #if ( tskSET_NEW_STACKS_TO_KNOWN_VALUE == 1 ) in prvInitialiseNewTask()
1824 #if ( portSTACK_GROWTH < 0 ) in prvInitialiseNewTask()
1832 #if ( configRECORD_STACK_HIGH_ADDRESS == 1 ) in prvInitialiseNewTask()
1848 /* The other extreme of the stack space is required if stack checking is in prvInitialiseNewTask()
1855 if( pcName != NULL ) in prvInitialiseNewTask()
1861 /* Don't copy all configMAX_TASK_NAME_LEN if the string is shorter than in prvInitialiseNewTask()
1864 if( pcName[ x ] == ( char ) 0x00 ) in prvInitialiseNewTask()
1886 if( uxPriority >= ( UBaseType_t ) configMAX_PRIORITIES ) in prvInitialiseNewTask()
1896 #if ( configUSE_MUTEXES == 1 ) in prvInitialiseNewTask()
1913 #if ( portUSING_MPU_WRAPPERS == 1 ) in prvInitialiseNewTask()
1924 #if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) in prvInitialiseNewTask()
1931 /* Initialize the TCB stack to look as if the task was already running, in prvInitialiseNewTask()
1935 #if ( portUSING_MPU_WRAPPERS == 1 ) in prvInitialiseNewTask()
1937 /* If the port has capability to detect stack overflow, in prvInitialiseNewTask()
1940 #if ( portHAS_STACK_OVERFLOW_CHECKING == 1 ) in prvInitialiseNewTask()
1942 #if ( portSTACK_GROWTH < 0 ) in prvInitialiseNewTask()
1960 /* If the port has capability to detect stack overflow, in prvInitialiseNewTask()
1963 #if ( portHAS_STACK_OVERFLOW_CHECKING == 1 ) in prvInitialiseNewTask()
1965 #if ( portSTACK_GROWTH < 0 ) in prvInitialiseNewTask()
1984 #if ( configNUMBER_OF_CORES > 1 ) in prvInitialiseNewTask()
1989if( ( ( TaskFunction_t ) pxTaskCode == ( TaskFunction_t ) prvIdleTask ) || ( ( TaskFunction_t ) px… in prvInitialiseNewTask()
1994 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */ in prvInitialiseNewTask()
1996 if( pxCreatedTask != NULL ) in prvInitialiseNewTask()
2009 #if ( configNUMBER_OF_CORES == 1 )
2019 if( pxCurrentTCB == NULL ) in prvAddNewTaskToReadyList()
2025 if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) in prvAddNewTaskToReadyList()
2028 * initialisation required. We will not recover if this call in prvAddNewTaskToReadyList()
2039 /* If the scheduler is not already running, make this task the in prvAddNewTaskToReadyList()
2040 * current task if it is the highest priority task to be created in prvAddNewTaskToReadyList()
2042 if( xSchedulerRunning == pdFALSE ) in prvAddNewTaskToReadyList()
2044 if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority ) in prvAddNewTaskToReadyList()
2061 #if ( configUSE_TRACE_FACILITY == 1 ) in prvAddNewTaskToReadyList()
2075 if( xSchedulerRunning != pdFALSE ) in prvAddNewTaskToReadyList()
2077 /* If the created task is of a higher priority than the current task in prvAddNewTaskToReadyList()
2087 #else /* #if ( configNUMBER_OF_CORES == 1 ) */
2097 if( xSchedulerRunning == pdFALSE ) in prvAddNewTaskToReadyList()
2099 if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) in prvAddNewTaskToReadyList()
2102 * initialisation required. We will not recover if this call in prvAddNewTaskToReadyList()
2111 if( ( pxNewTCB->uxTaskAttributes & taskATTRIBUTE_IS_IDLE ) != 0U ) in prvAddNewTaskToReadyList()
2115 /* Check if a core is free. */ in prvAddNewTaskToReadyList()
2118 if( pxCurrentTCBs[ xCoreID ] == NULL ) in prvAddNewTaskToReadyList()
2138 #if ( configUSE_TRACE_FACILITY == 1 ) in prvAddNewTaskToReadyList()
2150 if( xSchedulerRunning != pdFALSE ) in prvAddNewTaskToReadyList()
2152 /* If the created task is of a higher priority than another in prvAddNewTaskToReadyList()
2165 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */
2168 #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) )
2175 if( iSnprintfReturnValue < 0 ) in prvSnprintfReturnValueToCharsWritten()
2181 else if( iSnprintfReturnValue >= ( int ) n ) in prvSnprintfReturnValueToCharsWritten()
2198 #endif /* #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) )…
2201 #if ( INCLUDE_vTaskDelete == 1 )
2211 /* If null is passed in here then it is the calling task that is in vTaskDelete()
2216 if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) in vTaskDelete()
2226 if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) in vTaskDelete()
2241 /* If the task is running (or yielding), we must add it to the in vTaskDelete()
2244 if( taskTASK_IS_RUNNING_OR_SCHEDULED_TO_YIELD( pxTCB ) != pdFALSE ) in vTaskDelete()
2268 #if ( configNUMBER_OF_CORES == 1 ) in vTaskDelete()
2285 #if ( configNUMBER_OF_CORES == 1 ) in vTaskDelete()
2289 /* If the task is not deleting itself, call prvDeleteTCB from outside of in vTaskDelete()
2290 * critical section. If a task deletes itself, prvDeleteTCB is called in vTaskDelete()
2292 if( pxTCB != pxCurrentTCB ) in vTaskDelete()
2297 /* Force a reschedule if it is the currently running task that has just in vTaskDelete()
2299 if( xSchedulerRunning != pdFALSE ) in vTaskDelete()
2301 if( pxTCB == pxCurrentTCB ) in vTaskDelete()
2312 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskDelete()
2314 /* If a running task is not deleting itself, call prvDeleteTCB. If a running in vTaskDelete()
2317 if( pxTCB->xTaskRunState == taskTASK_NOT_RUNNING ) in vTaskDelete()
2322 /* Force a reschedule if the task that has just been deleted was running. */ in vTaskDelete()
2323 if( ( xSchedulerRunning != pdFALSE ) && ( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) ) in vTaskDelete()
2325 if( pxTCB->xTaskRunState == ( BaseType_t ) portGET_CORE_ID() ) in vTaskDelete()
2338 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskDelete()
2346 #if ( INCLUDE_xTaskDelayUntil == 1 )
2370 if( xConstTickCount < *pxPreviousWakeTime ) in xTaskDelayUntil()
2374 * actually delay is if the wake time has also overflowed, in xTaskDelayUntil()
2376 * is the case it is as if neither time had overflowed. */ in xTaskDelayUntil()
2377 if( ( xTimeToWake < *pxPreviousWakeTime ) && ( xTimeToWake > xConstTickCount ) ) in xTaskDelayUntil()
2389 * delay if either the wake time has overflowed, and/or the in xTaskDelayUntil()
2391 if( ( xTimeToWake < *pxPreviousWakeTime ) || ( xTimeToWake > xConstTickCount ) ) in xTaskDelayUntil()
2404 if( xShouldDelay != pdFALSE ) in xTaskDelayUntil()
2419 /* Force a reschedule if xTaskResumeAll has not already done so, we may in xTaskDelayUntil()
2421 if( xAlreadyYielded == pdFALSE ) in xTaskDelayUntil()
2438 #if ( INCLUDE_vTaskDelay == 1 )
2447 if( xTicksToDelay > ( TickType_t ) 0U ) in vTaskDelay()
2471 /* Force a reschedule if xTaskResumeAll has not already done so, we may in vTaskDelay()
2473 if( xAlreadyYielded == pdFALSE ) in vTaskDelay()
2488 #if ( ( INCLUDE_eTaskGetState == 1 ) || ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_xTaskAbortDe…
2503 #if ( configNUMBER_OF_CORES == 1 ) in eTaskGetState()
2504 if( pxTCB == pxCurrentTCB ) in eTaskGetState()
2521 if( pxEventList == &xPendingReadyList ) in eTaskGetState()
2528 … else if( ( pxStateList == pxDelayedList ) || ( pxStateList == pxOverflowedDelayedList ) ) in eTaskGetState()
2535 #if ( INCLUDE_vTaskSuspend == 1 ) in eTaskGetState()
2536 else if( pxStateList == &xSuspendedTaskList ) in eTaskGetState()
2541 if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL ) in eTaskGetState()
2543 #if ( configUSE_TASK_NOTIFICATIONS == 1 ) in eTaskGetState()
2549 * blocked state if it is waiting on its notification in eTaskGetState()
2550 * rather than waiting on an object. If not, is in eTaskGetState()
2556 if( pxTCB->ucNotifyState[ x ] == taskWAITING_NOTIFICATION ) in eTaskGetState()
2563 #else /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */ in eTaskGetState()
2567 #endif /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */ in eTaskGetState()
2574 #endif /* if ( INCLUDE_vTaskSuspend == 1 ) */ in eTaskGetState()
2576 #if ( INCLUDE_vTaskDelete == 1 ) in eTaskGetState()
2577 else if( ( pxStateList == &xTasksWaitingTermination ) || ( pxStateList == NULL ) ) in eTaskGetState()
2588 #if ( configNUMBER_OF_CORES == 1 ) in eTaskGetState()
2590 /* If the task is not in any other state, it must be in the in eTaskGetState()
2594 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in eTaskGetState()
2596 if( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) in eTaskGetState()
2603 /* If the task is not in any other state, it must be in the in eTaskGetState()
2608 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in eTaskGetState()
2620 #if ( INCLUDE_uxTaskPriorityGet == 1 )
2631 /* If null is passed in here then it is the priority of the task in uxTaskPriorityGet()
2646 #if ( INCLUDE_uxTaskPriorityGet == 1 )
2660 * but cannot make any calls to FreeRTOS API functions. If configASSERT() in uxTaskPriorityGetFromISR()
2663 * failure if a FreeRTOS API function is called from an interrupt that has in uxTaskPriorityGetFromISR()
2676 /* If null is passed in here then it is the priority of the calling in uxTaskPriorityGetFromISR()
2691 #if ( ( INCLUDE_uxTaskPriorityGet == 1 ) && ( configUSE_MUTEXES == 1 ) )
2702 /* If null is passed in here then it is the base priority of the task in uxTaskBasePriorityGet()
2714 #endif /* #if ( ( INCLUDE_uxTaskPriorityGet == 1 ) && ( configUSE_MUTEXES == 1 ) ) */
2717 #if ( ( INCLUDE_uxTaskPriorityGet == 1 ) && ( configUSE_MUTEXES == 1 ) )
2731 * but cannot make any calls to FreeRTOS API functions. If configASSERT() in uxTaskBasePriorityGetFromISR()
2734 * failure if a FreeRTOS API function is called from an interrupt that has in uxTaskBasePriorityGetFromISR()
2747 /* If null is passed in here then it is the base priority of the calling in uxTaskBasePriorityGetFromISR()
2759 #endif /* #if ( ( INCLUDE_uxTaskPriorityGet == 1 ) && ( configUSE_MUTEXES == 1 ) ) */
2762 #if ( INCLUDE_vTaskPrioritySet == 1 )
2771 #if ( configNUMBER_OF_CORES > 1 ) in vTaskPrioritySet()
2780 if( uxNewPriority >= ( UBaseType_t ) configMAX_PRIORITIES ) in vTaskPrioritySet()
2791 /* If null is passed in here then it is the priority of the calling in vTaskPrioritySet()
2797 #if ( configUSE_MUTEXES == 1 ) in vTaskPrioritySet()
2807 if( uxCurrentBasePriority != uxNewPriority ) in vTaskPrioritySet()
2811 if( uxNewPriority > uxCurrentBasePriority ) in vTaskPrioritySet()
2813 #if ( configNUMBER_OF_CORES == 1 ) in vTaskPrioritySet()
2815 if( pxTCB != pxCurrentTCB ) in vTaskPrioritySet()
2820 if( uxNewPriority > pxCurrentTCB->uxPriority ) in vTaskPrioritySet()
2836 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskPrioritySet()
2842 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskPrioritySet()
2844 else if( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) in vTaskPrioritySet()
2849 #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 ) in vTaskPrioritySet()
2850 if( pxTCB->xPreemptionDisable == pdFALSE ) in vTaskPrioritySet()
2868 #if ( configUSE_MUTEXES == 1 ) in vTaskPrioritySet()
2870 /* Only change the priority being used if the task is not in vTaskPrioritySet()
2873if( ( pxTCB->uxBasePriority == pxTCB->uxPriority ) || ( uxNewPriority > pxTCB->uxPriority ) ) in vTaskPrioritySet()
2885 #else /* if ( configUSE_MUTEXES == 1 ) */ in vTaskPrioritySet()
2889 #endif /* if ( configUSE_MUTEXES == 1 ) */ in vTaskPrioritySet()
2891 /* Only reset the event list item value if the value is not in vTaskPrioritySet()
2893if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) =… in vTaskPrioritySet()
2902 /* If the task is in the blocked or suspended list we need do in vTaskPrioritySet()
2903 * nothing more than change its priority variable. However, if in vTaskPrioritySet()
2906if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ uxPriorityUsedOnEntry ] ), &( pxTCB->xStateList… in vTaskPrioritySet()
2910 * section we can do this even if the scheduler is suspended. */ in vTaskPrioritySet()
2911 if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) in vTaskPrioritySet()
2927 #if ( configNUMBER_OF_CORES == 1 ) in vTaskPrioritySet()
2941 if( xYieldRequired != pdFALSE ) in vTaskPrioritySet()
2948 #if ( configNUMBER_OF_CORES > 1 ) in vTaskPrioritySet()
2949 if( xYieldForTask != pdFALSE ) in vTaskPrioritySet()
2951 /* The priority of the task is being raised. If a running in vTaskPrioritySet()
2957 #endif /* if ( configNUMBER_OF_CORES > 1 ) */ in vTaskPrioritySet()
2976 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) )
2984 #if ( configUSE_PREEMPTION == 1 ) in vTaskCoreAffinitySet()
2997 if( xSchedulerRunning != pdFALSE ) in vTaskCoreAffinitySet()
2999 if( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) in vTaskCoreAffinitySet()
3003 /* If the task can no longer run on the core it was running, in vTaskCoreAffinitySet()
3005if( ( uxCoreAffinityMask & ( ( UBaseType_t ) 1U << ( UBaseType_t ) xCoreID ) ) == 0U ) in vTaskCoreAffinitySet()
3012 #if ( configUSE_PREEMPTION == 1 ) in vTaskCoreAffinitySet()
3019 * previously not allowed cores? If yes, check if this task can be in vTaskCoreAffinitySet()
3021 if( ( uxPrevNotAllowedCores & uxCoreAffinityMask ) != 0U ) in vTaskCoreAffinitySet()
3026 #else /* #if( configUSE_PREEMPTION == 1 ) */ in vTaskCoreAffinitySet()
3030 #endif /* #if( configUSE_PREEMPTION == 1 ) */ in vTaskCoreAffinitySet()
3038 #endif /* #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) */
3041 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) )
3060 #endif /* #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) */
3064 #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
3083 #endif /* #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 ) */
3086 #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
3101 if( xSchedulerRunning != pdFALSE ) in vTaskPreemptionEnable()
3103 if( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) in vTaskPreemptionEnable()
3115 #endif /* #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 ) */
3118 #if ( INCLUDE_vTaskSuspend == 1 )
3124 #if ( configNUMBER_OF_CORES > 1 ) in vTaskSuspend()
3132 /* If null is passed in here then it is the running task that is in vTaskSuspend()
3138 #if ( configNUMBER_OF_CORES > 1 ) in vTaskSuspend()
3144 if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) in vTaskSuspend()
3154 if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) in vTaskSuspend()
3165 #if ( configUSE_TASK_NOTIFICATIONS == 1 ) in vTaskSuspend()
3171 if( pxTCB->ucNotifyState[ x ] == taskWAITING_NOTIFICATION ) in vTaskSuspend()
3179 #endif /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */ in vTaskSuspend()
3182 #if ( configNUMBER_OF_CORES == 1 ) in vTaskSuspend()
3186 if( xSchedulerRunning != pdFALSE ) in vTaskSuspend()
3201 if( pxTCB == pxCurrentTCB ) in vTaskSuspend()
3203 if( xSchedulerRunning != pdFALSE ) in vTaskSuspend()
3214 if( listCURRENT_LIST_LENGTH( &xSuspendedTaskList ) == uxCurrentNumberOfTasks ) in vTaskSuspend()
3233 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskSuspend()
3235 if( xSchedulerRunning != pdFALSE ) in vTaskSuspend()
3246 if( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) in vTaskSuspend()
3248 if( xSchedulerRunning != pdFALSE ) in vTaskSuspend()
3250 if( xTaskRunningOnCore == ( BaseType_t ) portGET_CORE_ID() ) in vTaskSuspend()
3278 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskSuspend()
3286 #if ( INCLUDE_vTaskSuspend == 1 )
3296 /* It does not make sense to check if the calling task is suspended. */ in prvTaskIsTaskSuspended()
3300 if( listIS_CONTAINED_WITHIN( &xSuspendedTaskList, &( pxTCB->xStateListItem ) ) != pdFALSE ) in prvTaskIsTaskSuspended()
3303if( listIS_CONTAINED_WITHIN( &xPendingReadyList, &( pxTCB->xEventListItem ) ) == pdFALSE ) in prvTaskIsTaskSuspended()
3307 if( listIS_CONTAINED_WITHIN( NULL, &( pxTCB->xEventListItem ) ) != pdFALSE ) in prvTaskIsTaskSuspended()
3309 #if ( configUSE_TASK_NOTIFICATIONS == 1 ) in prvTaskIsTaskSuspended()
3315 * blocked state if it is waiting on its notification in prvTaskIsTaskSuspended()
3316 * rather than waiting on an object. If not, is in prvTaskIsTaskSuspended()
3322 if( pxTCB->ucNotifyState[ x ] == taskWAITING_NOTIFICATION ) in prvTaskIsTaskSuspended()
3329 #else /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */ in prvTaskIsTaskSuspended()
3333 #endif /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */ in prvTaskIsTaskSuspended()
3356 #if ( INCLUDE_vTaskSuspend == 1 )
3367 #if ( configNUMBER_OF_CORES == 1 ) in vTaskResume()
3371 if( ( pxTCB != pxCurrentTCB ) && ( pxTCB != NULL ) ) in vTaskResume()
3378 * section and check if the task is actually suspended or not. */ in vTaskResume()
3379 if( pxTCB != NULL ) in vTaskResume()
3384 if( prvTaskIsTaskSuspended( pxTCB ) != pdFALSE ) in vTaskResume()
3388 /* The ready list can be accessed even if the scheduler is in vTaskResume()
3417 #if ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) )
3433 * but cannot make any calls to FreeRTOS API functions. If configASSERT() in xTaskResumeFromISR()
3436 * failure if a FreeRTOS API function is called from an interrupt that has in xTaskResumeFromISR()
3449 if( prvTaskIsTaskSuspended( pxTCB ) != pdFALSE ) in xTaskResumeFromISR()
3454 if( uxSchedulerSuspended == ( UBaseType_t ) 0U ) in xTaskResumeFromISR()
3456 #if ( configNUMBER_OF_CORES == 1 ) in xTaskResumeFromISR()
3460 if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) in xTaskResumeFromISR()
3474 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskResumeFromISR()
3487 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_PREEMPTION == 1 ) ) in xTaskResumeFromISR()
3491 if( xYieldPendings[ portGET_CORE_ID() ] != pdFALSE ) in xTaskResumeFromISR()
3496 #endif /* #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_PREEMPTION == 1 ) ) */ in xTaskResumeFromISR()
3525 /* Don't copy all configMAX_TASK_NAME_LEN if the string is shorter than in prvCreateIdleTasks()
3528 if( cIdleName[ xIdleTaskNameIndex ] == ( char ) 0x00 ) in prvCreateIdleTasks()
3541 #if ( configNUMBER_OF_CORES == 1 ) in prvCreateIdleTasks()
3545 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in prvCreateIdleTasks()
3550 if( xCoreID == 0 ) in prvCreateIdleTasks()
3559 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in prvCreateIdleTasks()
3564 #if ( configNUMBER_OF_CORES > 1 ) in prvCreateIdleTasks()
3566 /* Append the idle task number to the end of the name if there is space. */ in prvCreateIdleTasks()
3567 if( xIdleTaskNameIndex < ( BaseType_t ) configMAX_TASK_NAME_LEN ) in prvCreateIdleTasks()
3571 /* And append a null character if there is space. */ in prvCreateIdleTasks()
3572 if( ( xIdleTaskNameIndex + 1 ) < ( BaseType_t ) configMAX_TASK_NAME_LEN ) in prvCreateIdleTasks()
3586 #endif /* if ( configNUMBER_OF_CORES > 1 ) */ in prvCreateIdleTasks()
3588 #if ( configSUPPORT_STATIC_ALLOCATION == 1 ) in prvCreateIdleTasks()
3596 #if ( configNUMBER_OF_CORES == 1 ) in prvCreateIdleTasks()
3602 if( xCoreID == 0 ) in prvCreateIdleTasks()
3611 #endif /* if ( configNUMBER_OF_CORES == 1 ) */ in prvCreateIdleTasks()
3620 if( xIdleTaskHandles[ xCoreID ] != NULL ) in prvCreateIdleTasks()
3629 #else /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */ in prvCreateIdleTasks()
3641 /* Break the loop if any of the idle task is failed to be created. */ in prvCreateIdleTasks()
3642 if( xReturn == pdFAIL ) in prvCreateIdleTasks()
3663 #if ( configUSE_CORE_AFFINITY == 1 ) && ( configNUMBER_OF_CORES > 1 ) in vTaskStartScheduler()
3669 #endif /* #if ( configUSE_CORE_AFFINITY == 1 ) && ( configNUMBER_OF_CORES > 1 ) */ in vTaskStartScheduler()
3673 #if ( configUSE_TIMERS == 1 ) in vTaskStartScheduler()
3675 if( xReturn == pdPASS ) in vTaskStartScheduler()
3686 if( xReturn == pdPASS ) in vTaskStartScheduler()
3688 /* freertos_tasks_c_additions_init() should only be called if the user in vTaskStartScheduler()
3704 #if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) in vTaskStartScheduler()
3716 /* If configGENERATE_RUN_TIME_STATS is defined then the following in vTaskStartScheduler()
3718 * the run time counter time base. NOTE: If configGENERATE_RUN_TIME_STATS in vTaskStartScheduler()
3733 /* In most cases, xPortStartScheduler() will not return. If it in vTaskStartScheduler()
3735 * to create either the Idle or the Timer task. If it returned in vTaskStartScheduler()
3742 /* This line will only be reached if the kernel could not be started, in vTaskStartScheduler()
3748 /* Prevent compiler warnings if INCLUDE_xTaskGetIdleTaskHandle is set to 0, in vTaskStartScheduler()
3765 * routine so the original ISRs can be restored if necessary. The port in vTaskEndScheduler()
3779 #if ( configNUMBER_OF_CORES == 1 ) in vTaskSuspendAll()
3790 /* The scheduler is suspended if uxSchedulerSuspended is non-zero. An increment in vTaskSuspendAll()
3798 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskSuspendAll()
3805 if( xSchedulerRunning != pdFALSE ) in vTaskSuspendAll()
3823 if( uxSchedulerSuspended == 0U ) in vTaskSuspendAll()
3825 if( portGET_CRITICAL_NESTING_COUNT() == 0U ) in vTaskSuspendAll()
3841 /* The scheduler is suspended if uxSchedulerSuspended is non-zero. An increment in vTaskSuspendAll()
3853 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskSuspendAll()
3860 #if ( configUSE_TICKLESS_IDLE != 0 )
3871 #if ( configUSE_PORT_OPTIMISED_TASK_SELECTION == 0 ) in prvGetExpectedIdleTime()
3873 if( uxTopReadyPriority > tskIDLE_PRIORITY ) in prvGetExpectedIdleTime()
3883 * variable is used as a bit map. If bits other than the least in prvGetExpectedIdleTime()
3887 if( uxTopReadyPriority > uxLeastSignificantBit ) in prvGetExpectedIdleTime()
3892 #endif /* if ( configUSE_PORT_OPTIMISED_TASK_SELECTION == 0 ) */ in prvGetExpectedIdleTime()
3894 if( pxCurrentTCB->uxPriority > tskIDLE_PRIORITY ) in prvGetExpectedIdleTime()
3898 else if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > 1U ) in prvGetExpectedIdleTime()
3900 /* There are other idle priority tasks in the ready state. If in prvGetExpectedIdleTime()
3905 else if( uxHigherPriorityReadyTasks != pdFALSE ) in prvGetExpectedIdleTime()
3908 * idle priority. This path can only be reached if in prvGetExpectedIdleTime()
3931 #if ( configNUMBER_OF_CORES > 1 ) in xTaskResumeAll()
3932 if( xSchedulerRunning != pdFALSE ) in xTaskResumeAll()
3936 * list while the scheduler was suspended. If this was the case then the in xTaskResumeAll()
3945 /* If uxSchedulerSuspended is zero then this function does not match a in xTaskResumeAll()
3952 if( uxSchedulerSuspended == ( UBaseType_t ) 0U ) in xTaskResumeAll()
3954 if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) in xTaskResumeAll()
3969 #if ( configNUMBER_OF_CORES == 1 ) in xTaskResumeAll()
3971 /* If the moved task has a priority higher than the current in xTaskResumeAll()
3973 if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) in xTaskResumeAll()
3982 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskResumeAll()
3985 … * If the current core yielded then vTaskSwitchContext() has already been called in xTaskResumeAll()
3988 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskResumeAll()
3991 if( pxTCB != NULL ) in xTaskResumeAll()
4002 /* If any ticks occurred while the scheduler was suspended then in xTaskResumeAll()
4014 if( xPendedCounts > ( TickType_t ) 0U ) in xTaskResumeAll()
4018 if( xTaskIncrementTick() != pdFALSE ) in xTaskResumeAll()
4040 if( xYieldPendings[ xCoreID ] != pdFALSE ) in xTaskResumeAll()
4042 #if ( configUSE_PREEMPTION != 0 ) in xTaskResumeAll()
4046 #endif /* #if ( configUSE_PREEMPTION != 0 ) */ in xTaskResumeAll()
4048 #if ( configNUMBER_OF_CORES == 1 ) in xTaskResumeAll()
4052 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskResumeAll()
4080 /* Critical section required if running on a 16 bit processor. */ in xTaskGetTickCount()
4104 * FreeRTOS API functions. If configASSERT() is defined in FreeRTOSConfig.h in xTaskGetTickCountFromISR()
4106 * failure if a FreeRTOS API function is called from an interrupt that has been in xTaskGetTickCountFromISR()
4146 /* If null is passed in here then the name of the calling task is being in pcTaskGetName()
4157 #if ( INCLUDE_xTaskGetHandle == 1 )
4159 #if ( configNUMBER_OF_CORES == 1 )
4172 if( listCURRENT_LIST_LENGTH( pxList ) > ( UBaseType_t ) 0 ) in prvSearchForNameWithinSingleList()
4194 if( cNextChar != pcNameToQuery[ x ] ) in prvSearchForNameWithinSingleList()
4199 else if( cNextChar == ( char ) 0x00 ) in prvSearchForNameWithinSingleList()
4211 if( xBreakLoop != pdFALSE ) in prvSearchForNameWithinSingleList()
4217 if( pxReturn != NULL ) in prvSearchForNameWithinSingleList()
4231 #else /* if ( configNUMBER_OF_CORES == 1 ) */
4244 if( listCURRENT_LIST_LENGTH( pxList ) > ( UBaseType_t ) 0 ) in prvSearchForNameWithinSingleList()
4261 if( cNextChar != pcNameToQuery[ x ] ) in prvSearchForNameWithinSingleList()
4266 else if( cNextChar == ( char ) 0x00 ) in prvSearchForNameWithinSingleList()
4278 if( xBreakLoop != pdFALSE ) in prvSearchForNameWithinSingleList()
4284 if( pxReturn != NULL ) in prvSearchForNameWithinSingleList()
4298 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */
4303 #if ( INCLUDE_xTaskGetHandle == 1 )
4323 if( pxTCB != NULL ) in xTaskGetHandle()
4331 if( pxTCB == NULL ) in xTaskGetHandle()
4336 if( pxTCB == NULL ) in xTaskGetHandle()
4341 #if ( INCLUDE_vTaskSuspend == 1 ) in xTaskGetHandle()
4343 if( pxTCB == NULL ) in xTaskGetHandle()
4351 #if ( INCLUDE_vTaskDelete == 1 ) in xTaskGetHandle()
4353 if( pxTCB == NULL ) in xTaskGetHandle()
4371 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
4387 #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE == 1 ) in xTaskGetStaticBuffers()
4389 if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB ) in xTaskGetStaticBuffers()
4398 else if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY ) in xTaskGetStaticBuffers()
4425 #if ( configUSE_TRACE_FACILITY == 1 )
4438 if( uxArraySize >= uxCurrentNumberOfTasks ) in uxTaskGetSystemState()
4453 #if ( INCLUDE_vTaskDelete == 1 ) in uxTaskGetSystemState()
4461 #if ( INCLUDE_vTaskSuspend == 1 ) in uxTaskGetSystemState()
4469 #if ( configGENERATE_RUN_TIME_STATS == 1 ) in uxTaskGetSystemState()
4471 if( pulTotalRunTime != NULL ) in uxTaskGetSystemState()
4480 #else /* if ( configGENERATE_RUN_TIME_STATS == 1 ) */ in uxTaskGetSystemState()
4482 if( pulTotalRunTime != NULL ) in uxTaskGetSystemState()
4487 #endif /* if ( configGENERATE_RUN_TIME_STATS == 1 ) */ in uxTaskGetSystemState()
4504 #if ( INCLUDE_xTaskGetIdleTaskHandle == 1 )
4506 #if ( configNUMBER_OF_CORES == 1 )
4511 /* If xTaskGetIdleTaskHandle() is called before the scheduler has been in xTaskGetIdleTaskHandle()
4519 #endif /* if ( configNUMBER_OF_CORES == 1 ) */
4528 /* If xTaskGetIdleTaskHandle() is called before the scheduler has been in xTaskGetIdleTaskHandleForCore()
4544 #if ( configUSE_TICKLESS_IDLE != 0 )
4558 if( xUpdatedTickCount == xNextTaskUnblockTime ) in vTaskStepTick()
4616 #if ( INCLUDE_xTaskAbortDelay == 1 )
4629 /* A task can only be prematurely removed from the Blocked state if in xTaskAbortDelay()
4631 if( eTaskGetState( xTask ) == eBlocked ) in xTaskAbortDelay()
4640 /* Is the task waiting on an event also? If so remove it from in xTaskAbortDelay()
4646 if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) in xTaskAbortDelay()
4666 * switch if preemption is turned off. */ in xTaskAbortDelay()
4667 #if ( configUSE_PREEMPTION == 1 ) in xTaskAbortDelay()
4669 #if ( configNUMBER_OF_CORES == 1 ) in xTaskAbortDelay()
4672 * performed if the unblocked task has a priority that is in xTaskAbortDelay()
4674 if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) in xTaskAbortDelay()
4685 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskAbortDelay()
4693 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskAbortDelay()
4695 #endif /* #if ( configUSE_PREEMPTION == 1 ) */ in xTaskAbortDelay()
4718 #if ( configUSE_PREEMPTION == 1 ) && ( configNUMBER_OF_CORES > 1 ) in xTaskIncrementTick()
4720 #endif /* #if ( configUSE_PREEMPTION == 1 ) && ( configNUMBER_OF_CORES > 1 ) */ in xTaskIncrementTick()
4725 * Increments the tick then checks to see if the new tick value will cause any in xTaskIncrementTick()
4730 * responsibility to increment the tick, or increment the pended ticks if the in xTaskIncrementTick()
4731 * scheduler is suspended. If pended ticks is greater than zero, the core that in xTaskIncrementTick()
4733 if( uxSchedulerSuspended == ( UBaseType_t ) 0U ) in xTaskIncrementTick()
4740 * delayed lists if it wraps to 0. */ in xTaskIncrementTick()
4743 if( xConstTickCount == ( TickType_t ) 0U ) in xTaskIncrementTick()
4752 /* See if this tick has made a timeout expire. Tasks are stored in in xTaskIncrementTick()
4756 if( xConstTickCount >= xNextTaskUnblockTime ) in xTaskIncrementTick()
4760 if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) in xTaskIncrementTick()
4765 * if( xTickCount >= xNextTaskUnblockTime ) test will pass in xTaskIncrementTick()
4782 if( xConstTickCount < xItemValue ) in xTaskIncrementTick()
4800 /* Is the task waiting on an event also? If so remove in xTaskIncrementTick()
4802 if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) in xTaskIncrementTick()
4816 * context switch if preemption is turned off. */ in xTaskIncrementTick()
4817 #if ( configUSE_PREEMPTION == 1 ) in xTaskIncrementTick()
4819 #if ( configNUMBER_OF_CORES == 1 ) in xTaskIncrementTick()
4822 * only be performed if the unblocked task's in xTaskIncrementTick()
4829 if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) in xTaskIncrementTick()
4838 #else /* #if( configNUMBER_OF_CORES == 1 ) */ in xTaskIncrementTick()
4842 #endif /* #if( configNUMBER_OF_CORES == 1 ) */ in xTaskIncrementTick()
4844 #endif /* #if ( configUSE_PREEMPTION == 1 ) */ in xTaskIncrementTick()
4850 * processing time (time slice) if preemption is on, and the application in xTaskIncrementTick()
4852 #if ( ( configUSE_PREEMPTION == 1 ) && ( configUSE_TIME_SLICING == 1 ) ) in xTaskIncrementTick()
4854 #if ( configNUMBER_OF_CORES == 1 ) in xTaskIncrementTick()
4856if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCB->uxPriority ] ) ) > 1U ) in xTaskIncrementTick()
4865 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskIncrementTick()
4871if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCBs[ xCoreID ]->uxPriority ] ) ) > 1U… in xTaskIncrementTick()
4881 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskIncrementTick()
4883 #endif /* #if ( ( configUSE_PREEMPTION == 1 ) && ( configUSE_TIME_SLICING == 1 ) ) */ in xTaskIncrementTick()
4885 #if ( configUSE_TICK_HOOK == 1 ) in xTaskIncrementTick()
4889 if( xPendedTicks == ( TickType_t ) 0 ) in xTaskIncrementTick()
4900 #if ( configUSE_PREEMPTION == 1 ) in xTaskIncrementTick()
4902 #if ( configNUMBER_OF_CORES == 1 ) in xTaskIncrementTick()
4905 if( xYieldPendings[ 0 ] != pdFALSE ) in xTaskIncrementTick()
4914 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskIncrementTick()
4921 #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 ) in xTaskIncrementTick()
4922 if( pxCurrentTCBs[ xCoreID ]->xPreemptionDisable == pdFALSE ) in xTaskIncrementTick()
4925if( ( xYieldRequiredForCore[ xCoreID ] != pdFALSE ) || ( xYieldPendings[ xCoreID ] != pdFALSE ) ) in xTaskIncrementTick()
4927 if( xCoreID == xCurrentCoreID ) in xTaskIncrementTick()
4943 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskIncrementTick()
4945 #endif /* #if ( configUSE_PREEMPTION == 1 ) */ in xTaskIncrementTick()
4951 /* The tick hook gets called at regular intervals, even if the in xTaskIncrementTick()
4953 #if ( configUSE_TICK_HOOK == 1 ) in xTaskIncrementTick()
4966 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
4975 /* If xTask is NULL then it is the task hook of the calling task that is in vTaskSetApplicationTaskTag()
4977 if( xTask == NULL ) in vTaskSetApplicationTaskTag()
5000 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
5009 /* If xTask is NULL then set the calling task's hook. */ in xTaskGetApplicationTaskTag()
5028 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
5038 /* If xTask is NULL then set the calling task's hook. */ in xTaskGetApplicationTaskTagFromISR()
5057 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
5067 /* If xTask is NULL then we are calling our own task hook. */ in xTaskCallApplicationTaskHook()
5068 if( xTask == NULL ) in xTaskCallApplicationTaskHook()
5077 if( xTCB->pxTaskTag != NULL ) in xTaskCallApplicationTaskHook()
5094 #if ( configNUMBER_OF_CORES == 1 )
5099 if( uxSchedulerSuspended != ( UBaseType_t ) 0U ) in vTaskSwitchContext()
5110 #if ( configGENERATE_RUN_TIME_STATS == 1 ) in vTaskSwitchContext()
5125 if( ulTotalRunTime[ 0 ] > ulTaskSwitchedInTime[ 0 ] ) in vTaskSwitchContext()
5138 /* Check for stack overflow, if configured. */ in vTaskSwitchContext()
5142 #if ( configUSE_POSIX_ERRNO == 1 ) in vTaskSwitchContext()
5162 #if ( configUSE_POSIX_ERRNO == 1 ) in vTaskSwitchContext()
5168 #if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) in vTaskSwitchContext()
5179 #else /* if ( configNUMBER_OF_CORES == 1 ) */
5189 * and move on if another core suspended the scheduler. We should only in vTaskSwitchContext()
5190 * do that if the current core has suspended the scheduler. */ in vTaskSwitchContext()
5200 if( uxSchedulerSuspended != ( UBaseType_t ) 0U ) in vTaskSwitchContext()
5211 #if ( configGENERATE_RUN_TIME_STATS == 1 ) in vTaskSwitchContext()
5226 if( ulTotalRunTime[ xCoreID ] > ulTaskSwitchedInTime[ xCoreID ] ) in vTaskSwitchContext()
5239 /* Check for stack overflow, if configured. */ in vTaskSwitchContext()
5243 #if ( configUSE_POSIX_ERRNO == 1 ) in vTaskSwitchContext()
5259 #if ( configUSE_POSIX_ERRNO == 1 ) in vTaskSwitchContext()
5265 #if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) in vTaskSwitchContext()
5279 #endif /* if ( configNUMBER_OF_CORES > 1 ) */
5341 #if ( configUSE_TIMERS == 1 )
5363 /* If the task should block indefinitely then set the block time to a in vTaskPlaceOnEventListRestricted()
5366 if( xWaitIndefinitely != pdFALSE ) in vTaskPlaceOnEventListRestricted()
5394 * If an event is for a queue that is locked then this function will never in xTaskRemoveFromEventList()
5407 if( uxSchedulerSuspended == ( UBaseType_t ) 0U ) in xTaskRemoveFromEventList()
5412 #if ( configUSE_TICKLESS_IDLE != 0 ) in xTaskRemoveFromEventList()
5414 /* If a task is blocked on a kernel object then xNextTaskUnblockTime in xTaskRemoveFromEventList()
5415 * might be set to the blocked task's time out time. If the task is in xTaskRemoveFromEventList()
5418 * value when the tick count equals xNextTaskUnblockTime. However if in xTaskRemoveFromEventList()
5433 #if ( configNUMBER_OF_CORES == 1 ) in xTaskRemoveFromEventList()
5435 if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) in xTaskRemoveFromEventList()
5437 /* Return true if the task removed from the event list has a higher in xTaskRemoveFromEventList()
5438 * priority than the calling task. This allows the calling task to know if in xTaskRemoveFromEventList()
5451 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskRemoveFromEventList()
5455 #if ( configUSE_PREEMPTION == 1 ) in xTaskRemoveFromEventList()
5459 if( xYieldPendings[ portGET_CORE_ID() ] != pdFALSE ) in xTaskRemoveFromEventList()
5464 #endif /* #if ( configUSE_PREEMPTION == 1 ) */ in xTaskRemoveFromEventList()
5466 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskRemoveFromEventList()
5496 #if ( configUSE_TICKLESS_IDLE != 0 ) in vTaskRemoveFromUnorderedEventList()
5498 /* If a task is blocked on a kernel object then xNextTaskUnblockTime in vTaskRemoveFromUnorderedEventList()
5499 * might be set to the blocked task's time out time. If the task is in vTaskRemoveFromUnorderedEventList()
5502 * value when the tick count equals xNextTaskUnblockTime. However if in vTaskRemoveFromUnorderedEventList()
5516 #if ( configNUMBER_OF_CORES == 1 ) in vTaskRemoveFromUnorderedEventList()
5518 if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) in vTaskRemoveFromUnorderedEventList()
5527 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskRemoveFromUnorderedEventList()
5529 #if ( configUSE_PREEMPTION == 1 ) in vTaskRemoveFromUnorderedEventList()
5539 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskRemoveFromUnorderedEventList()
5589 #if ( INCLUDE_xTaskAbortDelay == 1 ) in xTaskCheckForTimeOut()
5590 if( pxCurrentTCB->ucDelayAborted != ( uint8_t ) pdFALSE ) in xTaskCheckForTimeOut()
5600 #if ( INCLUDE_vTaskSuspend == 1 ) in xTaskCheckForTimeOut()
5601 if( *pxTicksToWait == portMAX_DELAY ) in xTaskCheckForTimeOut()
5603 /* If INCLUDE_vTaskSuspend is set to 1 and the block time in xTaskCheckForTimeOut()
5611if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEnt… in xTaskCheckForTimeOut()
5621 else if( xElapsedTime < *pxTicksToWait ) in xTaskCheckForTimeOut()
5653 #if ( configUSE_TRACE_FACILITY == 1 )
5662 if( xTask != NULL ) in uxTaskGetTaskNumber()
5680 #if ( configUSE_TRACE_FACILITY == 1 )
5689 if( xTask != NULL ) in vTaskSetTaskNumber()
5716 #if ( configNUMBER_OF_CORES > 1 )
5725 #if ( configUSE_PREEMPTION == 0 ) in portTASK_FUNCTION()
5727 /* If we are not using preemption we keep forcing a task switch to in portTASK_FUNCTION()
5728 * see if any other task has become available. If we are using in portTASK_FUNCTION()
5735 #if ( ( configUSE_PREEMPTION == 1 ) && ( configIDLE_SHOULD_YIELD == 1 ) ) in portTASK_FUNCTION()
5738 * timesliced. If a task that is sharing the idle priority is ready in portTASK_FUNCTION()
5743 * the list, and an occasional incorrect value will not matter. If in portTASK_FUNCTION()
5747if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) config… in portTASK_FUNCTION()
5758 #if ( configUSE_PASSIVE_IDLE_HOOK == 1 ) in portTASK_FUNCTION()
5773 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
5796 * the idle task is responsible for deleting the task's secure context, if in portTASK_FUNCTION()
5800 #if ( configNUMBER_OF_CORES > 1 ) in portTASK_FUNCTION()
5806 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */ in portTASK_FUNCTION()
5810 /* See if any tasks have deleted themselves - if so then the idle task in portTASK_FUNCTION()
5814 #if ( configUSE_PREEMPTION == 0 ) in portTASK_FUNCTION()
5816 /* If we are not using preemption we keep forcing a task switch to in portTASK_FUNCTION()
5817 * see if any other task has become available. If we are using in portTASK_FUNCTION()
5824 #if ( ( configUSE_PREEMPTION == 1 ) && ( configIDLE_SHOULD_YIELD == 1 ) ) in portTASK_FUNCTION()
5827 * timesliced. If a task that is sharing the idle priority is ready in portTASK_FUNCTION()
5832 * the list, and an occasional incorrect value will not matter. If in portTASK_FUNCTION()
5836if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) config… in portTASK_FUNCTION()
5847 #if ( configUSE_IDLE_HOOK == 1 ) in portTASK_FUNCTION()
5858 #if ( configUSE_TICKLESS_IDLE != 0 ) in portTASK_FUNCTION()
5869 if( xExpectedIdleTime >= ( TickType_t ) configEXPECTED_IDLE_TIME_BEFORE_SLEEP ) in portTASK_FUNCTION()
5880 * if the application does not want in portTASK_FUNCTION()
5884 if( xExpectedIdleTime >= ( TickType_t ) configEXPECTED_IDLE_TIME_BEFORE_SLEEP ) in portTASK_FUNCTION()
5904 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_PASSIVE_IDLE_HOOK == 1 ) ) in portTASK_FUNCTION()
5916 #endif /* #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_PASSIVE_IDLE_HOOK == 1 ) ) */ in portTASK_FUNCTION()
5921 #if ( configUSE_TICKLESS_IDLE != 0 )
5925 #if ( INCLUDE_vTaskSuspend == 1 ) in eTaskConfirmSleepModeStatus()
5936 if( listCURRENT_LIST_LENGTH( &xPendingReadyList ) != 0U ) in eTaskConfirmSleepModeStatus()
5941 else if( xYieldPendings[ portGET_CORE_ID() ] != pdFALSE ) in eTaskConfirmSleepModeStatus()
5946 else if( xPendedTicks != 0U ) in eTaskConfirmSleepModeStatus()
5953 #if ( INCLUDE_vTaskSuspend == 1 ) in eTaskConfirmSleepModeStatus()
5954 …else if( listCURRENT_LIST_LENGTH( &xSuspendedTaskList ) == ( uxCurrentNumberOfTasks - uxNonApplica… in eTaskConfirmSleepModeStatus()
5956 /* If all the tasks are in the suspended list (which might mean they in eTaskConfirmSleepModeStatus()
5976 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )
5986 if( ( xIndex >= 0 ) && in vTaskSetThreadLocalStoragePointer()
6000 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )
6010 if( ( xIndex >= 0 ) && in pvTaskGetThreadLocalStoragePointer()
6029 #if ( portUSING_MPU_WRAPPERS == 1 )
6038 /* If null is passed in here then we are modifying the MPU settings of in vTaskAllocateMPURegions()
6063 #if ( INCLUDE_vTaskDelete == 1 ) in prvInitialiseTaskLists()
6069 #if ( INCLUDE_vTaskSuspend == 1 ) in prvInitialiseTaskLists()
6086 #if ( INCLUDE_vTaskDelete == 1 ) in prvCheckTasksWaitingTermination()
6094 #if ( configNUMBER_OF_CORES == 1 ) in prvCheckTasksWaitingTermination()
6112 #else /* #if( configNUMBER_OF_CORES == 1 ) */ in prvCheckTasksWaitingTermination()
6121 if( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U ) in prvCheckTasksWaitingTermination()
6128 if( pxTCB->xTaskRunState == taskTASK_NOT_RUNNING ) in prvCheckTasksWaitingTermination()
6146 if( pxTCB != NULL ) in prvCheckTasksWaitingTermination()
6151 #endif /* #if( configNUMBER_OF_CORES == 1 ) */ in prvCheckTasksWaitingTermination()
6158 #if ( configUSE_TRACE_FACILITY == 1 )
6176 #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) ) in vTaskGetInfo()
6182 #if ( ( configUSE_CORE_AFFINITY == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) in vTaskGetInfo()
6188 #if ( configUSE_MUTEXES == 1 ) in vTaskGetInfo()
6198 #if ( configGENERATE_RUN_TIME_STATS == 1 ) in vTaskGetInfo()
6208 /* Obtaining the task state is a little fiddly, so is only done if the in vTaskGetInfo()
6211 if( eState != eInvalid ) in vTaskGetInfo()
6213 if( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) in vTaskGetInfo()
6221 #if ( INCLUDE_vTaskSuspend == 1 ) in vTaskGetInfo()
6223 /* If the task is in the suspended list then there is a in vTaskGetInfo()
6226 if( eState == eSuspended ) in vTaskGetInfo()
6230 if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) in vTaskGetInfo()
6240 * blocked state if it is waiting on its notification in vTaskGetInfo()
6241 * rather than waiting on an object. If not, is in vTaskGetInfo()
6245 if( pxTCB->ucNotifyState[ x ] == taskWAITING_NOTIFICATION ) in vTaskGetInfo()
6263if( listIS_CONTAINED_WITHIN( &xPendingReadyList, &( pxTCB->xEventListItem ) ) != pdFALSE ) in vTaskGetInfo()
6278 if( xGetFreeStackSpace != pdFALSE ) in vTaskGetInfo()
6280 #if ( portSTACK_GROWTH > 0 ) in vTaskGetInfo()
6301 #if ( configUSE_TRACE_FACILITY == 1 )
6311 if( listCURRENT_LIST_LENGTH( pxList ) > ( UBaseType_t ) 0 ) in prvListTasksWithinSingleList()
6343 #if ( ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) || ( INCLUD…
6363 #if ( INCLUDE_uxTaskGetStackHighWaterMark2 == 1 )
6387 #if portSTACK_GROWTH < 0 in uxTaskGetStackHighWaterMark2()
6407 #if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 )
6419 #if portSTACK_GROWTH < 0 in uxTaskGetStackHighWaterMark()
6439 #if ( INCLUDE_vTaskDelete == 1 )
6448 #if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) in prvDeleteTCB()
6455 …#if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( p… in prvDeleteTCB()
6467 if( pxTCB->ucStaticallyAllocated == tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB ) in prvDeleteTCB()
6474 else if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY ) in prvDeleteTCB()
6496 if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) in prvResetNextTaskUnblockTime()
6500 * if( xTickCount >= xNextTaskUnblockTime ) test will pass until in prvResetNextTaskUnblockTime()
6515 #if ( ( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) || ( configUSE_MUTEXES == 1 ) ) || ( configNUMBER_…
6517 #if ( configNUMBER_OF_CORES == 1 )
6533 #else /* #if ( configNUMBER_OF_CORES == 1 ) */
6558 if( taskVALID_CORE_ID( xCoreID ) != pdFALSE ) in xTaskGetCurrentTaskHandleForCore()
6567 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */
6572 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
6580 if( xSchedulerRunning == pdFALSE ) in xTaskGetSchedulerState()
6586 #if ( configNUMBER_OF_CORES > 1 ) in xTaskGetSchedulerState()
6590 if( uxSchedulerSuspended == ( UBaseType_t ) 0U ) in xTaskGetSchedulerState()
6599 #if ( configNUMBER_OF_CORES > 1 ) in xTaskGetSchedulerState()
6612 #if ( configUSE_MUTEXES == 1 )
6621 /* If the mutex is taken by an interrupt, the mutex holder is NULL. Priority in xTaskPriorityInherit()
6623 if( pxMutexHolder != NULL ) in xTaskPriorityInherit()
6625 /* If the holder of the mutex has a priority below the priority of in xTaskPriorityInherit()
6628 if( pxMutexHolderTCB->uxPriority < pxCurrentTCB->uxPriority ) in xTaskPriorityInherit()
6631 * priority. Only reset the event list item value if the value is in xTaskPriorityInherit()
6633if( ( listGET_LIST_ITEM_VALUE( &( pxMutexHolderTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE… in xTaskPriorityInherit()
6642 /* If the task being modified is in the ready state it will need in xTaskPriorityInherit()
6644if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxMutexHolderTCB->uxPriority ] ), &( pxMutexHol… in xTaskPriorityInherit()
6646 if( uxListRemove( &( pxMutexHolderTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) in xTaskPriorityInherit()
6661 #if ( configNUMBER_OF_CORES > 1 ) in xTaskPriorityInherit()
6664 * if it is not running. */ in xTaskPriorityInherit()
6665 if( taskTASK_IS_RUNNING( pxMutexHolderTCB ) != pdTRUE ) in xTaskPriorityInherit()
6670 #endif /* if ( configNUMBER_OF_CORES > 1 ) */ in xTaskPriorityInherit()
6685 if( pxMutexHolderTCB->uxBasePriority < pxCurrentTCB->uxPriority ) in xTaskPriorityInherit()
6692 * priority, but inheritance would have occurred if that had in xTaskPriorityInherit()
6715 #if ( configUSE_MUTEXES == 1 )
6724 if( pxMutexHolder != NULL ) in xTaskPriorityDisinherit()
6726 /* A task can only have an inherited priority if it holds the mutex. in xTaskPriorityDisinherit()
6727 * If the mutex is held by a task then it cannot be given from an in xTaskPriorityDisinherit()
6728 * interrupt, and if a mutex is given by the holding task then it must in xTaskPriorityDisinherit()
6736 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) in xTaskPriorityDisinherit()
6738 /* Only disinherit if no other mutexes are held. */ in xTaskPriorityDisinherit()
6739 if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) in xTaskPriorityDisinherit()
6741 /* A task can only have an inherited priority if it holds in xTaskPriorityDisinherit()
6742 * the mutex. If the mutex is held by a task then it cannot be in xTaskPriorityDisinherit()
6743 * given from an interrupt, and if a mutex is given by the in xTaskPriorityDisinherit()
6746 if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) in xTaskPriorityDisinherit()
6761 * any other purpose if this task is running, and it must be in xTaskPriorityDisinherit()
6765 #if ( configNUMBER_OF_CORES > 1 ) in xTaskPriorityDisinherit()
6769 if( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) in xTaskPriorityDisinherit()
6774 #endif /* if ( configNUMBER_OF_CORES > 1 ) */ in xTaskPriorityDisinherit()
6780 * If a context switch did not occur when the first mutex was in xTaskPriorityDisinherit()
6781 * returned, even if a task was waiting on it, then a context in xTaskPriorityDisinherit()
6809 #if ( configUSE_MUTEXES == 1 )
6820 if( pxMutexHolder != NULL ) in vTaskPriorityDisinheritAfterTimeout()
6822 /* If pxMutexHolder is not NULL then the holder must hold at least in vTaskPriorityDisinheritAfterTimeout()
6830 if( pxTCB->uxBasePriority < uxHighestPriorityWaitingTask ) in vTaskPriorityDisinheritAfterTimeout()
6840 if( pxTCB->uxPriority != uxPriorityToUse ) in vTaskPriorityDisinheritAfterTimeout()
6842 /* Only disinherit if no other mutexes are held. This is a in vTaskPriorityDisinheritAfterTimeout()
6843 * simplification in the priority inheritance implementation. If in vTaskPriorityDisinheritAfterTimeout()
6846 if( pxTCB->uxMutexesHeld == uxOnlyOneMutexHeld ) in vTaskPriorityDisinheritAfterTimeout()
6848 /* If a task has timed out because it already holds the in vTaskPriorityDisinheritAfterTimeout()
6860 /* Only reset the event list item value if the value is not in vTaskPriorityDisinheritAfterTimeout()
6862if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) =… in vTaskPriorityDisinheritAfterTimeout()
6871 /* If the running task is not the task that holds the mutex in vTaskPriorityDisinheritAfterTimeout()
6874 * from its current state list if it is in the Ready state as in vTaskPriorityDisinheritAfterTimeout()
6877if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ uxPriorityUsedOnEntry ] ), &( pxTCB->xStateList… in vTaskPriorityDisinheritAfterTimeout()
6879 if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) in vTaskPriorityDisinheritAfterTimeout()
6892 #if ( configNUMBER_OF_CORES > 1 ) in vTaskPriorityDisinheritAfterTimeout()
6896 if( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) in vTaskPriorityDisinheritAfterTimeout()
6901 #endif /* if ( configNUMBER_OF_CORES > 1 ) */ in vTaskPriorityDisinheritAfterTimeout()
6929 #if ( configNUMBER_OF_CORES > 1 )
6931 /* If not in a critical section then yield immediately.
6939 if( portGET_CRITICAL_NESTING_COUNT() == 0U ) in vTaskYieldWithinAPI()
6950 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
6954 #if ( ( portCRITICAL_NESTING_IN_TCB == 1 ) && ( configNUMBER_OF_CORES == 1 ) )
6962 if( xSchedulerRunning != pdFALSE ) in vTaskEnterCritical()
6967 * function so assert() if it is being called from an interrupt in vTaskEnterCritical()
6969 * interrupt. Only assert if the critical nesting count is 1 to in vTaskEnterCritical()
6970 * protect against recursive calls if the assert function also uses a in vTaskEnterCritical()
6972 if( pxCurrentTCB->uxCriticalNesting == 1U ) in vTaskEnterCritical()
6985 #endif /* #if ( ( portCRITICAL_NESTING_IN_TCB == 1 ) && ( configNUMBER_OF_CORES == 1 ) ) */
6988 #if ( configNUMBER_OF_CORES > 1 )
6996 if( xSchedulerRunning != pdFALSE ) in vTaskEnterCritical()
6998 if( portGET_CRITICAL_NESTING_COUNT() == 0U ) in vTaskEnterCritical()
7007 * function so assert() if it is being called from an interrupt in vTaskEnterCritical()
7009 * interrupt. Only assert if the critical nesting count is 1 to in vTaskEnterCritical()
7010 * protect against recursive calls if the assert function also uses a in vTaskEnterCritical()
7012 if( portGET_CRITICAL_NESTING_COUNT() == 1U ) in vTaskEnterCritical()
7016 if( uxSchedulerSuspended == 0U ) in vTaskEnterCritical()
7018 /* The only time there would be a problem is if this is called in vTaskEnterCritical()
7034 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
7038 #if ( configNUMBER_OF_CORES > 1 )
7046 if( xSchedulerRunning != pdFALSE ) in vTaskEnterCriticalFromISR()
7050 if( portGET_CRITICAL_NESTING_COUNT() == 0U ) in vTaskEnterCriticalFromISR()
7067 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
7070 #if ( ( portCRITICAL_NESTING_IN_TCB == 1 ) && ( configNUMBER_OF_CORES == 1 ) )
7076 if( xSchedulerRunning != pdFALSE ) in vTaskExitCritical()
7078 /* If pxCurrentTCB->uxCriticalNesting is zero then this function in vTaskExitCritical()
7086 if( pxCurrentTCB->uxCriticalNesting > 0U ) in vTaskExitCritical()
7090 if( pxCurrentTCB->uxCriticalNesting == 0U ) in vTaskExitCritical()
7112 #endif /* #if ( ( portCRITICAL_NESTING_IN_TCB == 1 ) && ( configNUMBER_OF_CORES == 1 ) ) */
7115 #if ( configNUMBER_OF_CORES > 1 )
7121 if( xSchedulerRunning != pdFALSE ) in vTaskExitCritical()
7123 /* If critical nesting count is zero then this function in vTaskExitCritical()
7131 if( portGET_CRITICAL_NESTING_COUNT() > 0U ) in vTaskExitCritical()
7135 if( portGET_CRITICAL_NESTING_COUNT() == 0U ) in vTaskExitCritical()
7148 * critical section check if xYieldPending is true, and in vTaskExitCritical()
7149 * if so yield. */ in vTaskExitCritical()
7150 if( xYieldCurrentTask != pdFALSE ) in vTaskExitCritical()
7173 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
7176 #if ( configNUMBER_OF_CORES > 1 )
7182 if( xSchedulerRunning != pdFALSE ) in vTaskExitCriticalFromISR()
7184 /* If critical nesting count is zero then this function in vTaskExitCriticalFromISR()
7188 if( portGET_CRITICAL_NESTING_COUNT() > 0U ) in vTaskExitCriticalFromISR()
7192 if( portGET_CRITICAL_NESTING_COUNT() == 0U ) in vTaskExitCriticalFromISR()
7215 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
7218 #if ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 )
7245 #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) )
7294 /* Allocate an array index for each task. NOTE! if in vTaskListTasks()
7302 if( pxTaskStatusArray != NULL ) in vTaskListTasks()
7340 if( ( uxConsumedBufferLength + configMAX_TASK_NAME_LEN ) <= uxBufferLength ) in vTaskListTasks()
7350 * checking if the buffer has space to write at least one non-null in vTaskListTasks()
7352 if( uxConsumedBufferLength < ( uxBufferLength - 1U ) ) in vTaskListTasks()
7355 #if ( ( configUSE_CORE_AFFINITY == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) in vTaskListTasks()
7394 if( xOutputBufferFull == pdTRUE ) in vTaskListTasks()
7400 /* Free the array again. NOTE! If configSUPPORT_DYNAMIC_ALLOCATION in vTaskListTasks()
7415 #if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) && ( c…
7463 /* Allocate an array index for each task. NOTE! If in vTaskGetRunTimeStatistics()
7471 if( pxTaskStatusArray != NULL ) in vTaskGetRunTimeStatistics()
7480 if( ulTotalTime > 0UL ) in vTaskGetRunTimeStatistics()
7491 if( ( uxConsumedBufferLength + configMAX_TASK_NAME_LEN ) <= uxBufferLength ) in vTaskGetRunTimeStatistics()
7502 * checking if the buffer has space to write at least one non-null in vTaskGetRunTimeStatistics()
7504 if( uxConsumedBufferLength < ( uxBufferLength - 1U ) ) in vTaskGetRunTimeStatistics()
7506 if( ulStatsAsPercentage > 0UL ) in vTaskGetRunTimeStatistics()
7536 /* If the percentage is zero here then the task has in vTaskGetRunTimeStatistics()
7577 if( xOutputBufferFull == pdTRUE ) in vTaskGetRunTimeStatistics()
7588 /* Free the array again. NOTE! If configSUPPORT_DYNAMIC_ALLOCATION in vTaskGetRunTimeStatistics()
7621 #if ( configUSE_MUTEXES == 1 )
7631 /* If xSemaphoreCreateMutex() is called before any tasks have been created in pvTaskIncrementMutexHeldCount()
7633 if( pxTCB != NULL ) in pvTaskIncrementMutexHeldCount()
7646 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
7661 /* Only block if the notification count is not already non-zero. */ in ulTaskGenericNotifyTake()
7662 if( pxCurrentTCB->ulNotifiedValue[ uxIndexToWaitOn ] == 0UL ) in ulTaskGenericNotifyTake()
7667 if( xTicksToWait > ( TickType_t ) 0 ) in ulTaskGenericNotifyTake()
7674 * If we do not do so, a notification sent from an ISR, which in ulTaskGenericNotifyTake()
7713 if( xAlreadyYielded == pdFALSE ) in ulTaskGenericNotifyTake()
7737 if( ulReturn != 0UL ) in ulTaskGenericNotifyTake()
7739 if( xClearCountOnExit != pdFALSE ) in ulTaskGenericNotifyTake()
7765 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
7781 /* Only block if a notification is not already pending. */ in xTaskGenericNotifyWait()
7782 if( pxCurrentTCB->ucNotifyState[ uxIndexToWaitOn ] != taskNOTIFICATION_RECEIVED ) in xTaskGenericNotifyWait()
7792 if( xTicksToWait > ( TickType_t ) 0 ) in xTaskGenericNotifyWait()
7799 * If we do not do so, a notification sent from an ISR, which in xTaskGenericNotifyWait()
7838 if( xAlreadyYielded == pdFALSE ) in xTaskGenericNotifyWait()
7861 if( pulNotificationValue != NULL ) in xTaskGenericNotifyWait()
7868 /* If ucNotifyValue is set then either the task never entered the in xTaskGenericNotifyWait()
7872 if( pxCurrentTCB->ucNotifyState[ uxIndexToWaitOn ] != taskNOTIFICATION_RECEIVED ) in xTaskGenericNotifyWait()
7897 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
7917 if( pulPreviousNotificationValue != NULL ) in xTaskGenericNotify()
7942 if( ucOriginalNotifyState != taskNOTIFICATION_RECEIVED ) in xTaskGenericNotify()
7962 /* Should not get here if all enums are handled. in xTaskGenericNotify()
7972 /* If the task is in the blocked state specifically to wait for a in xTaskGenericNotify()
7974 if( ucOriginalNotifyState == taskWAITING_NOTIFICATION ) in xTaskGenericNotify()
7982 #if ( configUSE_TICKLESS_IDLE != 0 ) in xTaskGenericNotify()
7984 /* If a task is blocked waiting for a notification then in xTaskGenericNotify()
7986 * out time. If the task is unblocked for a reason other than in xTaskGenericNotify()
7989 * the tick count equals xNextTaskUnblockTime. However if in xTaskGenericNotify()
7998 /* Check if the notified task has a priority above the currently in xTaskGenericNotify()
8017 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
8040 * but cannot make any calls to FreeRTOS API functions. If configASSERT() in xTaskGenericNotifyFromISR()
8043 * failure if a FreeRTOS API function is called from an interrupt that has in xTaskGenericNotifyFromISR()
8058 if( pulPreviousNotificationValue != NULL ) in xTaskGenericNotifyFromISR()
8082 if( ucOriginalNotifyState != taskNOTIFICATION_RECEIVED ) in xTaskGenericNotifyFromISR()
8102 /* Should not get here if all enums are handled. in xTaskGenericNotifyFromISR()
8111 /* If the task is in the blocked state specifically to wait for a in xTaskGenericNotifyFromISR()
8113 if( ucOriginalNotifyState == taskWAITING_NOTIFICATION ) in xTaskGenericNotifyFromISR()
8118 if( uxSchedulerSuspended == ( UBaseType_t ) 0U ) in xTaskGenericNotifyFromISR()
8130 #if ( configNUMBER_OF_CORES == 1 ) in xTaskGenericNotifyFromISR()
8132 if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) in xTaskGenericNotifyFromISR()
8136 if( pxHigherPriorityTaskWoken != NULL ) in xTaskGenericNotifyFromISR()
8151 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskGenericNotifyFromISR()
8153 #if ( configUSE_PREEMPTION == 1 ) in xTaskGenericNotifyFromISR()
8157 if( xYieldPendings[ portGET_CORE_ID() ] == pdTRUE ) in xTaskGenericNotifyFromISR()
8159 if( pxHigherPriorityTaskWoken != NULL ) in xTaskGenericNotifyFromISR()
8165 #endif /* if ( configUSE_PREEMPTION == 1 ) */ in xTaskGenericNotifyFromISR()
8167 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in xTaskGenericNotifyFromISR()
8180 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
8199 * but cannot make any calls to FreeRTOS API functions. If configASSERT() in vTaskGenericNotifyGiveFromISR()
8202 * failure if a FreeRTOS API function is called from an interrupt that has in vTaskGenericNotifyGiveFromISR()
8226 /* If the task is in the blocked state specifically to wait for a in vTaskGenericNotifyGiveFromISR()
8228 if( ucOriginalNotifyState == taskWAITING_NOTIFICATION ) in vTaskGenericNotifyGiveFromISR()
8233 if( uxSchedulerSuspended == ( UBaseType_t ) 0U ) in vTaskGenericNotifyGiveFromISR()
8245 #if ( configNUMBER_OF_CORES == 1 ) in vTaskGenericNotifyGiveFromISR()
8247 if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) in vTaskGenericNotifyGiveFromISR()
8251 if( pxHigherPriorityTaskWoken != NULL ) in vTaskGenericNotifyGiveFromISR()
8266 #else /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskGenericNotifyGiveFromISR()
8268 #if ( configUSE_PREEMPTION == 1 ) in vTaskGenericNotifyGiveFromISR()
8272 if( xYieldPendings[ portGET_CORE_ID() ] == pdTRUE ) in vTaskGenericNotifyGiveFromISR()
8274 if( pxHigherPriorityTaskWoken != NULL ) in vTaskGenericNotifyGiveFromISR()
8280 #endif /* #if ( configUSE_PREEMPTION == 1 ) */ in vTaskGenericNotifyGiveFromISR()
8282 #endif /* #if ( configNUMBER_OF_CORES == 1 ) */ in vTaskGenericNotifyGiveFromISR()
8293 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
8305 /* If null is passed in here then it is the calling task that is having in xTaskGenericNotifyStateClear()
8311 if( pxTCB->ucNotifyState[ uxIndexToClear ] == taskNOTIFICATION_RECEIVED ) in xTaskGenericNotifyStateClear()
8331 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
8344 /* If null is passed in here then it is the calling task that is having in ulTaskGenericNotifyValueClear()
8365 #if ( configGENERATE_RUN_TIME_STATS == 1 )
8380 #endif /* if ( configGENERATE_RUN_TIME_STATS == 1 ) */
8383 #if ( configGENERATE_RUN_TIME_STATS == 1 )
8398 if( ulTotalTime > ( configRUN_TIME_COUNTER_TYPE ) 0 ) in ulTaskGetRunTimePercent()
8413 #endif /* if ( configGENERATE_RUN_TIME_STATS == 1 ) */
8416 #if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) )
8435 #endif /* if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) ) …
8438 #if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) )
8454 if( ulTotalTime > ( configRUN_TIME_COUNTER_TYPE ) 0 ) in ulTaskGetIdleRunTimePercent()
8473 #endif /* if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) ) …
8484 #if ( INCLUDE_xTaskAbortDelay == 1 ) in prvAddCurrentTaskToDelayedList()
8495 if( uxListRemove( &( pxCurrentTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) in prvAddCurrentTaskToDelayedList()
8506 #if ( INCLUDE_vTaskSuspend == 1 ) in prvAddCurrentTaskToDelayedList()
8508 if( ( xTicksToWait == portMAX_DELAY ) && ( xCanBlockIndefinitely != pdFALSE ) ) in prvAddCurrentTaskToDelayedList()
8517 /* Calculate the time at which the task should be woken if the event in prvAddCurrentTaskToDelayedList()
8525 if( xTimeToWake < xConstTickCount ) in prvAddCurrentTaskToDelayedList()
8539 /* If the task entering the blocked state was placed at the in prvAddCurrentTaskToDelayedList()
8542 if( xTimeToWake < xNextTaskUnblockTime ) in prvAddCurrentTaskToDelayedList()
8555 /* Calculate the time at which the task should be woken if the event in prvAddCurrentTaskToDelayedList()
8563 if( xTimeToWake < xConstTickCount ) in prvAddCurrentTaskToDelayedList()
8575 /* If the task entering the blocked state was placed at the head of the in prvAddCurrentTaskToDelayedList()
8578 if( xTimeToWake < xNextTaskUnblockTime ) in prvAddCurrentTaskToDelayedList()
8595 #if ( portUSING_MPU_WRAPPERS == 1 )
8622 #if ( configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H == 1 )
8633 #endif /* if ( configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H == 1 ) */
8636 #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) && (…
8657 #if ( configNUMBER_OF_CORES > 1 )
8672 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
8674 #endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY =…
8677 #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) && (…
8698 #endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY =…