#include "list.h"
Data Structures | |
struct | xMEMORY_REGION |
struct | xTASK_PARAMETERS |
struct | xTASK_STATUS |
struct | xTIME_OUT |
Macros | |
#define | taskDISABLE_INTERRUPTS() portDISABLE_INTERRUPTS() |
#define | taskENABLE_INTERRUPTS() portENABLE_INTERRUPTS() |
#define | taskENTER_CRITICAL() portENTER_CRITICAL() |
#define | taskENTER_CRITICAL_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR() |
#define | taskEXIT_CRITICAL() portEXIT_CRITICAL() |
#define | taskEXIT_CRITICAL_FROM_ISR(x) portCLEAR_INTERRUPT_MASK_FROM_ISR( x ) |
#define | taskSCHEDULER_NOT_STARTED ( ( BaseType_t ) 1 ) |
#define | taskSCHEDULER_RUNNING ( ( BaseType_t ) 2 ) |
#define | taskSCHEDULER_SUSPENDED ( ( BaseType_t ) 0 ) |
#define | taskYIELD() portYIELD() |
#define | tskIDLE_PRIORITY ( ( UBaseType_t ) 0U ) |
Defines the priority used by the idle task. More... | |
#define | tskKERNEL_VERSION_BUILD 0 |
#define | tskKERNEL_VERSION_MAJOR 9 |
#define | tskKERNEL_VERSION_MINOR 0 |
#define | tskKERNEL_VERSION_NUMBER "V9.0.0" |
#define | xTaskNotify(xTaskToNotify, ulValue, eAction) xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL ) |
#define | xTaskNotifyAndQuery(xTaskToNotify, ulValue, eAction, pulPreviousNotifyValue) xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), ( pulPreviousNotifyValue ) ) |
#define | xTaskNotifyAndQueryFromISR(xTaskToNotify, ulValue, eAction, pulPreviousNotificationValue, pxHigherPriorityTaskWoken) xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( ulValue ), ( eAction ), ( pulPreviousNotificationValue ), ( pxHigherPriorityTaskWoken ) ) |
#define | xTaskNotifyFromISR(xTaskToNotify, ulValue, eAction, pxHigherPriorityTaskWoken) xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL, ( pxHigherPriorityTaskWoken ) ) |
#define | xTaskNotifyGive(xTaskToNotify) xTaskGenericNotify( ( xTaskToNotify ), ( 0 ), eIncrement, NULL ) |
Typedefs | |
typedef struct xMEMORY_REGION | MemoryRegion_t |
typedef void * | TaskHandle_t |
typedef BaseType_t(* | TaskHookFunction_t )(void *) |
typedef struct xTASK_PARAMETERS | TaskParameters_t |
typedef struct xTASK_STATUS | TaskStatus_t |
typedef struct xTIME_OUT | TimeOut_t |
Enumerations | |
enum | eNotifyAction { eNoAction = 0, eSetBits, eIncrement, eSetValueWithOverwrite, eSetValueWithoutOverwrite } |
enum | eSleepModeStatus { eAbortSleep = 0, eStandardSleep, eNoTasksWaitingTimeout } |
enum | eTaskState { eRunning = 0, eReady, eBlocked, eSuspended, eDeleted, eInvalid } |
#define taskDISABLE_INTERRUPTS | ( | ) | portDISABLE_INTERRUPTS() |
#define taskENABLE_INTERRUPTS | ( | ) | portENABLE_INTERRUPTS() |
#define taskENTER_CRITICAL | ( | ) | portENTER_CRITICAL() |
Referenced by prvAddNewTaskToReadyList(), prvCheckTasksWaitingTermination(), prvIsQueueEmpty(), prvIsQueueFull(), prvUnlockQueue(), ulTaskNotifyTake(), uxQueueMessagesWaiting(), uxQueueSpacesAvailable(), vTaskPrioritySet(), vTaskResume(), vTaskSetTimeOutState(), vTaskSuspend(), xEventGroupClearBits(), xEventGroupSync(), xEventGroupWaitBits(), xQueueGenericReset(), xQueueGenericSend(), xQueuePeek(), xQueueReceive(), xQueueSemaphoreTake(), xStreamBufferReceive(), xStreamBufferSend(), xTaskCheckForTimeOut(), xTaskGenericNotify(), xTaskNotifyStateClear(), xTaskNotifyWait(), and xTaskResumeAll().
#define taskENTER_CRITICAL_FROM_ISR | ( | ) | portSET_INTERRUPT_MASK_FROM_ISR() |
#define taskEXIT_CRITICAL | ( | ) | portEXIT_CRITICAL() |
Referenced by prvAddNewTaskToReadyList(), prvCheckTasksWaitingTermination(), prvIsQueueEmpty(), prvIsQueueFull(), prvUnlockQueue(), ulTaskNotifyTake(), uxQueueMessagesWaiting(), uxQueueSpacesAvailable(), vTaskPrioritySet(), vTaskResume(), vTaskSetTimeOutState(), vTaskSuspend(), xEventGroupClearBits(), xEventGroupSync(), xEventGroupWaitBits(), xQueueGenericReset(), xQueueGenericSend(), xQueuePeek(), xQueueReceive(), xQueueSemaphoreTake(), xStreamBufferReceive(), xStreamBufferSend(), xTaskCheckForTimeOut(), xTaskGenericNotify(), xTaskNotifyStateClear(), xTaskNotifyWait(), and xTaskResumeAll().
#define taskEXIT_CRITICAL_FROM_ISR | ( | x | ) | portCLEAR_INTERRUPT_MASK_FROM_ISR( x ) |
#define taskSCHEDULER_NOT_STARTED ( ( BaseType_t ) 1 ) |
#define taskSCHEDULER_RUNNING ( ( BaseType_t ) 2 ) |
#define taskSCHEDULER_SUSPENDED ( ( BaseType_t ) 0 ) |
Referenced by xEventGroupSync(), xEventGroupWaitBits(), xQueueGenericSend(), xQueuePeek(), xQueueReceive(), and xQueueSemaphoreTake().
#define taskYIELD | ( | ) | portYIELD() |
Referenced by portTASK_FUNCTION().
#define tskIDLE_PRIORITY ( ( UBaseType_t ) 0U ) |
Defines the priority used by the idle task.
This must not be modified.
Referenced by main(), and vTaskStartScheduler().
#define tskKERNEL_VERSION_BUILD 0 |
#define tskKERNEL_VERSION_MAJOR 9 |
#define tskKERNEL_VERSION_MINOR 0 |
#define tskKERNEL_VERSION_NUMBER "V9.0.0" |
#define xTaskNotify | ( | xTaskToNotify, | |
ulValue, | |||
eAction | |||
) | xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL ) |
#define xTaskNotifyAndQuery | ( | xTaskToNotify, | |
ulValue, | |||
eAction, | |||
pulPreviousNotifyValue | |||
) | xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), ( pulPreviousNotifyValue ) ) |
#define xTaskNotifyAndQueryFromISR | ( | xTaskToNotify, | |
ulValue, | |||
eAction, | |||
pulPreviousNotificationValue, | |||
pxHigherPriorityTaskWoken | |||
) | xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( ulValue ), ( eAction ), ( pulPreviousNotificationValue ), ( pxHigherPriorityTaskWoken ) ) |
#define xTaskNotifyFromISR | ( | xTaskToNotify, | |
ulValue, | |||
eAction, | |||
pxHigherPriorityTaskWoken | |||
) | xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL, ( pxHigherPriorityTaskWoken ) ) |
Referenced by xStreamBufferReceiveCompletedFromISR(), and xStreamBufferSendCompletedFromISR().
#define xTaskNotifyGive | ( | xTaskToNotify | ) | xTaskGenericNotify( ( xTaskToNotify ), ( 0 ), eIncrement, NULL ) |
typedef struct xMEMORY_REGION MemoryRegion_t |
typedef void* TaskHandle_t |
typedef BaseType_t(* TaskHookFunction_t)(void *) |
typedef struct xTASK_PARAMETERS TaskParameters_t |
typedef struct xTASK_STATUS TaskStatus_t |
enum eNotifyAction |
enum eSleepModeStatus |
enum eTaskState |
eSleepModeStatus eTaskConfirmSleepModeStatus | ( | void | ) |
eTaskState eTaskGetState | ( | TaskHandle_t | xTask | ) |
task.
h
eTaskState eTaskGetState( TaskHandle_t xTask );
INCLUDE_eTaskGetState must be defined as 1 for this function to be available. See the configuration section for more information.
Obtain the state of any task. States are encoded by the eTaskState enumerated type.
xTask | Handle of the task to be queried. |
char* pcTaskGetName | ( | TaskHandle_t | xTaskToQuery | ) |
References configASSERT, tskTaskControlBlock::pcTaskName, and prvGetTCBFromHandle.
void* pvTaskIncrementMutexHeldCount | ( | void | ) |
Referenced by xQueueSemaphoreTake().
uint32_t ulTaskNotifyTake | ( | BaseType_t | xClearCountOnExit, |
TickType_t | xTicksToWait | ||
) |
References mtCOVERAGE_TEST_MARKER, pdFALSE, pdTRUE, portYIELD_WITHIN_API, prvAddCurrentTaskToDelayedList(), pxCurrentTCB, taskENTER_CRITICAL, taskEXIT_CRITICAL, taskNOT_WAITING_NOTIFICATION, taskWAITING_NOTIFICATION, traceTASK_NOTIFY_TAKE, traceTASK_NOTIFY_TAKE_BLOCK, tskTaskControlBlock::ucNotifyState, and tskTaskControlBlock::ulNotifiedValue.
UBaseType_t uxTaskGetNumberOfTasks | ( | void | ) |
References uxCurrentNumberOfTasks.
UBaseType_t uxTaskGetStackHighWaterMark | ( | TaskHandle_t | xTask | ) |
UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask );
INCLUDE_uxTaskGetStackHighWaterMark must be set to 1 in FreeRTOSConfig.h for this function to be available.
Returns the high water mark of the stack associated with xTask. That is, the minimum free stack space there has been (in words, so on a 32 bit machine a value of 1 means 4 bytes) since the task started. The smaller the returned number the closer the task has come to overflowing its stack.
xTask | Handle of the task associated with the stack to be checked. Set xTask to NULL to check the stack of the calling task. |
UBaseType_t uxTaskGetSystemState | ( | TaskStatus_t *const | pxTaskStatusArray, |
const UBaseType_t | uxArraySize, | ||
uint32_t *const | pulTotalRunTime | ||
) |
configUSE_TRACE_FACILITY must be defined as 1 in FreeRTOSConfig.h for uxTaskGetSystemState() to be available.
uxTaskGetSystemState() populates an TaskStatus_t structure for each task in the system. TaskStatus_t structures contain, among other things, members for the task handle, task name, task priority, task state, and total amount of run time consumed by the task. See the TaskStatus_t structure definition in this file for the full member list.
NOTE: This function is intended for debugging use only as its use results in the scheduler remaining suspended for an extended period.
pxTaskStatusArray | A pointer to an array of TaskStatus_t structures. The array must contain at least one TaskStatus_t structure for each task that is under the control of the RTOS. The number of tasks under the control of the RTOS can be determined using the uxTaskGetNumberOfTasks() API function. |
uxArraySize | The size of the array pointed to by the pxTaskStatusArray parameter. The size is specified as the number of indexes in the array, or the number of TaskStatus_t structures contained in the array, not by the number of bytes in the array. |
pulTotalRunTime | If configGENERATE_RUN_TIME_STATS is set to 1 in FreeRTOSConfig.h then *pulTotalRunTime is set by uxTaskGetSystemState() to the total run time (as defined by the run time stats clock, see http://www.freertos.org/rtos-run-time-stats.html) since the target booted. pulTotalRunTime can be set to NULL to omit the total run time information. |
Example usage:
This example demonstrates how a human readable table of run time stats information is generated from raw data provided by uxTaskGetSystemState(). The human readable table is written to pcWriteBuffer void vTaskGetRunTimeStats( char *pcWriteBuffer ) { TaskStatus_t *pxTaskStatusArray; volatile UBaseType_t uxArraySize, x; uint32_t ulTotalRunTime, ulStatsAsPercentage;
Make sure the write buffer does not contain a string. pcWriteBuffer = 0x00;
Take a snapshot of the number of tasks in case it changes while this function is executing. uxArraySize = uxTaskGetNumberOfTasks();
Allocate a TaskStatus_t structure for each task. An array could be allocated statically at compile time. pxTaskStatusArray = pvPortMalloc( uxArraySize * sizeof( TaskStatus_t ) );
if( pxTaskStatusArray != NULL ) { Generate raw status information about each task. uxArraySize = uxTaskGetSystemState( pxTaskStatusArray, uxArraySize, &ulTotalRunTime );
For percentage calculations. ulTotalRunTime /= 100UL;
Avoid divide by zero errors. if( ulTotalRunTime > 0 ) { For each populated position in the pxTaskStatusArray array, format the raw data as human readable ASCII data for( x = 0; x < uxArraySize; x++ ) { What percentage of the total run time has the task used? This will always be rounded down to the nearest integer. ulTotalRunTimeDiv100 has already been divided by 100. ulStatsAsPercentage = pxTaskStatusArray[ x ].ulRunTimeCounter / ulTotalRunTime;
if( ulStatsAsPercentage > 0UL ) { sprintf( pcWriteBuffer, "%s\t\t%lu\t\t%lu%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter, ulStatsAsPercentage ); } else { If the percentage is zero here then the task has consumed less than 1% of the total run time. sprintf( pcWriteBuffer, "%s\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter ); }
pcWriteBuffer += strlen( ( char * ) pcWriteBuffer ); } }
The array is no longer needed, free the memory it consumes. vPortFree( pxTaskStatusArray ); } }
UBaseType_t uxTaskGetTaskNumber | ( | TaskHandle_t | xTask | ) |
UBaseType_t uxTaskPriorityGet | ( | TaskHandle_t | xTask | ) |
UBaseType_t uxTaskPriorityGetFromISR | ( | TaskHandle_t | xTask | ) |
task.
h
UBaseType_t uxTaskPriorityGetFromISR( TaskHandle_t xTask );
A version of uxTaskPriorityGet() that can be used from an ISR.
TickType_t uxTaskResetEventItemValue | ( | void | ) |
References configMAX_PRIORITIES, listGET_LIST_ITEM_VALUE, listSET_LIST_ITEM_VALUE, pxCurrentTCB, tskTaskControlBlock::uxPriority, and tskTaskControlBlock::xEventListItem.
Referenced by xEventGroupSync(), and xEventGroupWaitBits().
void vTaskAllocateMPURegions | ( | TaskHandle_t | xTask, |
const MemoryRegion_t *const | pxRegions | ||
) |
void vTaskDelay | ( | const TickType_t | xTicksToDelay | ) |
void vTaskDelayUntil | ( | TickType_t *const | pxPreviousWakeTime, |
const TickType_t | xTimeIncrement | ||
) |
void vTaskDelete | ( | TaskHandle_t | xTaskToDelete | ) |
void vTaskEndScheduler | ( | void | ) |
References pdFALSE, vPortEndScheduler(), and xSchedulerRunning.
void vTaskGetInfo | ( | TaskHandle_t | xTask, |
TaskStatus_t * | pxTaskStatus, | ||
BaseType_t | xGetFreeStackSpace, | ||
eTaskState | eState | ||
) |
void vTaskGetRunTimeStats | ( | char * | pcWriteBuffer | ) |
void vTaskInternalSetTimeOutState | ( | TimeOut_t *const | pxTimeOut | ) |
References xNumOfOverflows, xTIME_OUT::xOverflowCount, xTickCount, and xTIME_OUT::xTimeOnEntering.
Referenced by xQueueGenericSend(), xQueuePeek(), xQueueReceive(), xQueueSemaphoreTake(), and xTaskCheckForTimeOut().
void vTaskList | ( | char * | pcWriteBuffer | ) |
void vTaskMissedYield | ( | void | ) |
References pdTRUE, and xYieldPending.
Referenced by prvUnlockQueue().
void vTaskNotifyGiveFromISR | ( | TaskHandle_t | xTaskToNotify, |
BaseType_t * | pxHigherPriorityTaskWoken | ||
) |
References configASSERT, listLIST_ITEM_CONTAINER, mtCOVERAGE_TEST_MARKER, pdFALSE, pdTRUE, portASSERT_IF_INTERRUPT_PRIORITY_INVALID, portCLEAR_INTERRUPT_MASK_FROM_ISR, portSET_INTERRUPT_MASK_FROM_ISR, prvAddTaskToReadyList, pxCurrentTCB, taskNOTIFICATION_RECEIVED, taskWAITING_NOTIFICATION, traceTASK_NOTIFY_GIVE_FROM_ISR, tskTaskControlBlock::ucNotifyState, tskTaskControlBlock::ulNotifiedValue, uxListRemove(), tskTaskControlBlock::uxPriority, uxSchedulerSuspended, vListInsertEnd(), tskTaskControlBlock::xEventListItem, xPendingReadyList, tskTaskControlBlock::xStateListItem, and xYieldPending.
void vTaskPlaceOnEventList | ( | List_t *const | pxEventList, |
const TickType_t | xTicksToWait | ||
) |
References configASSERT, pdTRUE, prvAddCurrentTaskToDelayedList(), pxCurrentTCB, vListInsert(), and tskTaskControlBlock::xEventListItem.
Referenced by xQueueGenericSend(), xQueuePeek(), xQueueReceive(), and xQueueSemaphoreTake().
void vTaskPlaceOnEventListRestricted | ( | List_t *const | pxEventList, |
TickType_t | xTicksToWait, | ||
const BaseType_t | xWaitIndefinitely | ||
) |
void vTaskPlaceOnUnorderedEventList | ( | List_t * | pxEventList, |
const TickType_t | xItemValue, | ||
const TickType_t | xTicksToWait | ||
) |
void vTaskPriorityDisinheritAfterTimeout | ( | TaskHandle_t const | pxMutexHolder, |
UBaseType_t | uxHighestPriorityWaitingTask | ||
) |
Referenced by xQueueSemaphoreTake().
void vTaskPrioritySet | ( | TaskHandle_t | xTask, |
UBaseType_t | uxNewPriority | ||
) |
References configASSERT, configMAX_PRIORITIES, listGET_LIST_ITEM_VALUE, listIS_CONTAINED_WITHIN, listSET_LIST_ITEM_VALUE, mtCOVERAGE_TEST_MARKER, pdFALSE, pdTRUE, portRESET_READY_PRIORITY, prvAddTaskToReadyList, prvGetTCBFromHandle, pxCurrentTCB, pxReadyTasksLists, taskENTER_CRITICAL, taskEVENT_LIST_ITEM_VALUE_IN_USE, taskEXIT_CRITICAL, taskYIELD_IF_USING_PREEMPTION, traceTASK_PRIORITY_SET, uxListRemove(), tskTaskControlBlock::uxPriority, uxTopReadyPriority, tskTaskControlBlock::xEventListItem, and tskTaskControlBlock::xStateListItem.
void vTaskRemoveFromUnorderedEventList | ( | ListItem_t * | pxEventListItem, |
const TickType_t | xItemValue | ||
) |
References configASSERT, listGET_LIST_ITEM_OWNER, listSET_LIST_ITEM_VALUE, pdFALSE, pdTRUE, prvAddTaskToReadyList, pxCurrentTCB, taskEVENT_LIST_ITEM_VALUE_IN_USE, uxListRemove(), tskTaskControlBlock::uxPriority, uxSchedulerSuspended, tskTaskControlBlock::xStateListItem, and xYieldPending.
Referenced by vEventGroupDelete(), and xEventGroupSetBits().
void vTaskResume | ( | TaskHandle_t | xTaskToResume | ) |
void vTaskSetTaskNumber | ( | TaskHandle_t | xTask, |
const UBaseType_t | uxHandle | ||
) |
void vTaskSetTimeOutState | ( | TimeOut_t *const | pxTimeOut | ) |
References configASSERT, taskENTER_CRITICAL, taskEXIT_CRITICAL, xNumOfOverflows, xTIME_OUT::xOverflowCount, xTickCount, and xTIME_OUT::xTimeOnEntering.
Referenced by xStreamBufferSend().
void vTaskStartScheduler | ( | void | ) |
References configASSERT, configIDLE_TASK_NAME, configMINIMAL_STACK_SIZE, errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY, mtCOVERAGE_TEST_MARKER, pdFAIL, pdFALSE, pdPASS, pdTRUE, portCONFIGURE_TIMER_FOR_RUN_TIME_STATS, portPRIVILEGE_BIT, pxCurrentTCB, tskIDLE_PRIORITY, xIdleTaskHandle, xNextTaskUnblockTime, xPortStartScheduler(), xSchedulerRunning, xTickCount, and xTimerCreateTimerTask().
Referenced by main().
void vTaskStepTick | ( | const TickType_t | xTicksToJump | ) |
void vTaskSuspend | ( | TaskHandle_t | xTaskToSuspend | ) |
References configASSERT, listCURRENT_LIST_LENGTH, listLIST_ITEM_CONTAINER, mtCOVERAGE_TEST_MARKER, pdFALSE, portYIELD_WITHIN_API, prvGetTCBFromHandle, prvResetNextTaskUnblockTime(), pxCurrentTCB, taskENTER_CRITICAL, taskEXIT_CRITICAL, taskNOT_WAITING_NOTIFICATION, taskRESET_READY_PRIORITY, taskWAITING_NOTIFICATION, traceTASK_SUSPEND, tskTaskControlBlock::ucNotifyState, uxCurrentNumberOfTasks, uxListRemove(), tskTaskControlBlock::uxPriority, uxSchedulerSuspended, vListInsertEnd(), vTaskSwitchContext(), tskTaskControlBlock::xEventListItem, xSchedulerRunning, tskTaskControlBlock::xStateListItem, and xSuspendedTaskList.
void vTaskSuspendAll | ( | void | ) |
void vTaskSwitchContext | ( | void | ) |
References mtCOVERAGE_TEST_MARKER, pdFALSE, pdTRUE, pxCurrentTCB, taskCHECK_FOR_STACK_OVERFLOW, taskSELECT_HIGHEST_PRIORITY_TASK, traceTASK_SWITCHED_IN, traceTASK_SWITCHED_OUT, uxSchedulerSuspended, and xYieldPending.
Referenced by vTaskSuspend().
BaseType_t xTaskAbortDelay | ( | TaskHandle_t | xTask | ) |
BaseType_t xTaskCallApplicationTaskHook | ( | TaskHandle_t | xTask, |
void * | pvParameter | ||
) |
BaseType_t xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );
Calls the hook function associated with xTask. Passing xTask as NULL has the effect of calling the Running tasks (the calling task) hook function.
pvParameter is passed to the hook function for the task to interpret as it wants. The return value is the value returned by the task hook function registered by the user.
BaseType_t xTaskCheckForTimeOut | ( | TimeOut_t *const | pxTimeOut, |
TickType_t *const | pxTicksToWait | ||
) |
References configASSERT, pdFALSE, pdTRUE, pxCurrentTCB, taskENTER_CRITICAL, taskEXIT_CRITICAL, vTaskInternalSetTimeOutState(), xNumOfOverflows, xTIME_OUT::xOverflowCount, xTickCount, and xTIME_OUT::xTimeOnEntering.
Referenced by xQueueGenericSend(), xQueuePeek(), xQueueReceive(), xQueueSemaphoreTake(), and xStreamBufferSend().
BaseType_t xTaskGenericNotify | ( | TaskHandle_t | xTaskToNotify, |
uint32_t | ulValue, | ||
eNotifyAction | eAction, | ||
uint32_t * | pulPreviousNotificationValue | ||
) |
References configASSERT, eIncrement, eNoAction, eSetBits, eSetValueWithoutOverwrite, eSetValueWithOverwrite, listLIST_ITEM_CONTAINER, mtCOVERAGE_TEST_MARKER, pdFAIL, pdPASS, prvAddTaskToReadyList, prvResetNextTaskUnblockTime(), pxCurrentTCB, taskENTER_CRITICAL, taskEXIT_CRITICAL, taskNOTIFICATION_RECEIVED, taskWAITING_NOTIFICATION, taskYIELD_IF_USING_PREEMPTION, traceTASK_NOTIFY, tskTaskControlBlock::ucNotifyState, tskTaskControlBlock::ulNotifiedValue, uxListRemove(), tskTaskControlBlock::uxPriority, tskTaskControlBlock::xEventListItem, and tskTaskControlBlock::xStateListItem.
BaseType_t xTaskGenericNotifyFromISR | ( | TaskHandle_t | xTaskToNotify, |
uint32_t | ulValue, | ||
eNotifyAction | eAction, | ||
uint32_t * | pulPreviousNotificationValue, | ||
BaseType_t * | pxHigherPriorityTaskWoken | ||
) |
References configASSERT, eIncrement, eNoAction, eSetBits, eSetValueWithoutOverwrite, eSetValueWithOverwrite, listLIST_ITEM_CONTAINER, mtCOVERAGE_TEST_MARKER, pdFAIL, pdFALSE, pdPASS, pdTRUE, portASSERT_IF_INTERRUPT_PRIORITY_INVALID, portCLEAR_INTERRUPT_MASK_FROM_ISR, portSET_INTERRUPT_MASK_FROM_ISR, prvAddTaskToReadyList, pxCurrentTCB, taskNOTIFICATION_RECEIVED, taskWAITING_NOTIFICATION, traceTASK_NOTIFY_FROM_ISR, tskTaskControlBlock::ucNotifyState, tskTaskControlBlock::ulNotifiedValue, uxListRemove(), tskTaskControlBlock::uxPriority, uxSchedulerSuspended, vListInsertEnd(), tskTaskControlBlock::xEventListItem, xPendingReadyList, tskTaskControlBlock::xStateListItem, and xYieldPending.
TaskHandle_t xTaskGetCurrentTaskHandle | ( | void | ) |
Referenced by xStreamBufferReceive(), and xStreamBufferSend().
TaskHandle_t xTaskGetHandle | ( | const char * | pcNameToQuery | ) |
TaskHandle_t xTaskGetIdleTaskHandle | ( | void | ) |
xTaskGetIdleTaskHandle() is only available if INCLUDE_xTaskGetIdleTaskHandle is set to 1 in FreeRTOSConfig.h.
Simply returns the handle of the idle task. It is not valid to call xTaskGetIdleTaskHandle() before the scheduler has been started.
BaseType_t xTaskGetSchedulerState | ( | void | ) |
Referenced by xEventGroupSync(), xEventGroupWaitBits(), xQueueGenericSend(), xQueuePeek(), xQueueReceive(), and xQueueSemaphoreTake().
TickType_t xTaskGetTickCount | ( | void | ) |
References portTICK_TYPE_ENTER_CRITICAL, portTICK_TYPE_EXIT_CRITICAL, and xTickCount.
TickType_t xTaskGetTickCountFromISR | ( | void | ) |
BaseType_t xTaskIncrementTick | ( | void | ) |
References listCURRENT_LIST_LENGTH, listGET_LIST_ITEM_VALUE, listGET_OWNER_OF_HEAD_ENTRY, listLIST_IS_EMPTY, listLIST_ITEM_CONTAINER, mtCOVERAGE_TEST_MARKER, pdFALSE, pdTRUE, prvAddTaskToReadyList, pxCurrentTCB, pxDelayedTaskList, pxReadyTasksLists, taskSWITCH_DELAYED_LISTS, traceTASK_INCREMENT_TICK, uxListRemove(), uxPendedTicks, tskTaskControlBlock::uxPriority, uxSchedulerSuspended, tskTaskControlBlock::xEventListItem, xNextTaskUnblockTime, tskTaskControlBlock::xStateListItem, xTickCount, and xYieldPending.
Referenced by xTaskResumeAll().
BaseType_t xTaskNotifyStateClear | ( | TaskHandle_t | xTask | ) |
References pdFAIL, pdPASS, prvGetTCBFromHandle, taskENTER_CRITICAL, taskEXIT_CRITICAL, taskNOT_WAITING_NOTIFICATION, taskNOTIFICATION_RECEIVED, and tskTaskControlBlock::ucNotifyState.
Referenced by xStreamBufferReceive(), and xStreamBufferSend().
BaseType_t xTaskNotifyWait | ( | uint32_t | ulBitsToClearOnEntry, |
uint32_t | ulBitsToClearOnExit, | ||
uint32_t * | pulNotificationValue, | ||
TickType_t | xTicksToWait | ||
) |
References mtCOVERAGE_TEST_MARKER, pdFALSE, pdTRUE, portYIELD_WITHIN_API, prvAddCurrentTaskToDelayedList(), pxCurrentTCB, taskENTER_CRITICAL, taskEXIT_CRITICAL, taskNOT_WAITING_NOTIFICATION, taskNOTIFICATION_RECEIVED, taskWAITING_NOTIFICATION, traceTASK_NOTIFY_WAIT, traceTASK_NOTIFY_WAIT_BLOCK, tskTaskControlBlock::ucNotifyState, and tskTaskControlBlock::ulNotifiedValue.
Referenced by xStreamBufferReceive(), and xStreamBufferSend().
BaseType_t xTaskPriorityDisinherit | ( | TaskHandle_t const | pxMutexHolder | ) |
Referenced by prvCopyDataToQueue().
BaseType_t xTaskPriorityInherit | ( | TaskHandle_t const | pxMutexHolder | ) |
Referenced by xQueueSemaphoreTake().
BaseType_t xTaskRemoveFromEventList | ( | const List_t *const | pxEventList | ) |
References configASSERT, listGET_OWNER_OF_HEAD_ENTRY, pdFALSE, pdTRUE, prvAddTaskToReadyList, prvResetNextTaskUnblockTime(), pxCurrentTCB, uxListRemove(), tskTaskControlBlock::uxPriority, uxSchedulerSuspended, vListInsertEnd(), tskTaskControlBlock::xEventListItem, xPendingReadyList, tskTaskControlBlock::xStateListItem, and xYieldPending.
Referenced by prvUnlockQueue(), xQueueGenericReset(), xQueueGenericSend(), xQueueGenericSendFromISR(), xQueueGiveFromISR(), xQueuePeek(), xQueueReceive(), xQueueReceiveFromISR(), and xQueueSemaphoreTake().
BaseType_t xTaskResumeAll | ( | void | ) |
References configASSERT, listGET_OWNER_OF_HEAD_ENTRY, listLIST_IS_EMPTY, mtCOVERAGE_TEST_MARKER, pdFALSE, pdTRUE, prvAddTaskToReadyList, prvResetNextTaskUnblockTime(), pxCurrentTCB, taskENTER_CRITICAL, taskEXIT_CRITICAL, taskYIELD_IF_USING_PREEMPTION, uxCurrentNumberOfTasks, uxListRemove(), uxPendedTicks, tskTaskControlBlock::uxPriority, uxSchedulerSuspended, tskTaskControlBlock::xEventListItem, xPendingReadyList, tskTaskControlBlock::xStateListItem, xTaskIncrementTick(), and xYieldPending.
Referenced by portTASK_FUNCTION(), pvPortMalloc(), vEventGroupDelete(), vTaskDelay(), xEventGroupSetBits(), xEventGroupSync(), xEventGroupWaitBits(), xQueueGenericSend(), xQueuePeek(), xQueueReceive(), and xQueueSemaphoreTake().
BaseType_t xTaskResumeFromISR | ( | TaskHandle_t | xTaskToResume | ) |
References configASSERT, mtCOVERAGE_TEST_MARKER, pdFALSE, pdTRUE, portASSERT_IF_INTERRUPT_PRIORITY_INVALID, portCLEAR_INTERRUPT_MASK_FROM_ISR, portSET_INTERRUPT_MASK_FROM_ISR, prvAddTaskToReadyList, prvTaskIsTaskSuspended(), pxCurrentTCB, traceTASK_RESUME_FROM_ISR, uxListRemove(), tskTaskControlBlock::uxPriority, uxSchedulerSuspended, vListInsertEnd(), tskTaskControlBlock::xEventListItem, xPendingReadyList, and tskTaskControlBlock::xStateListItem.