Data Structures | |
struct | xMEMORY_REGION |
struct | xTASK_PARAMTERS |
struct | xTIME_OUT |
Macros | |
#define | taskDISABLE_INTERRUPTS() portDISABLE_INTERRUPTS() |
#define | taskENABLE_INTERRUPTS() portENABLE_INTERRUPTS() |
#define | taskENTER_CRITICAL() portENTER_CRITICAL() |
#define | taskEXIT_CRITICAL() portEXIT_CRITICAL() |
#define | taskSCHEDULER_NOT_STARTED 0 |
#define | taskSCHEDULER_RUNNING 1 |
#define | taskSCHEDULER_SUSPENDED 2 |
#define | taskYIELD() portYIELD() |
#define | tskIDLE_PRIORITY ( ( unsigned portBASE_TYPE ) 0U ) |
#define | tskKERNEL_VERSION_NUMBER "V7.3.0" |
#define | xTaskCreate(pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask) xTaskGenericCreate( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), ( NULL ), ( NULL ) ) |
#define | xTaskCreateRestricted(x, pxCreatedTask) xTaskGenericCreate( ((x)->pvTaskCode), ((x)->pcName), ((x)->usStackDepth), ((x)->pvParameters), ((x)->uxPriority), (pxCreatedTask), ((x)->puxStackBuffer), ((x)->xRegions) ) |
Typedefs | |
typedef struct xMEMORY_REGION | xMemoryRegion |
typedef void * | xTaskHandle |
typedef struct xTASK_PARAMTERS | xTaskParameters |
typedef struct xTIME_OUT | xTimeOutType |
Enumerations | |
enum | eTaskState { eRunning = 0, eReady, eBlocked, eSuspended, eDeleted, eRunning = 0, eReady, eBlocked, eSuspended, eDeleted, eRunning = 0, eReady, eBlocked, eSuspended, eDeleted, eInvalid } |
#define taskDISABLE_INTERRUPTS | ( | ) | portDISABLE_INTERRUPTS() |
#define taskENABLE_INTERRUPTS | ( | ) | portENABLE_INTERRUPTS() |
#define taskENTER_CRITICAL | ( | ) | portENTER_CRITICAL() |
Referenced by FreeRTOS_CLIRegisterCommand(), prvAddNewTaskToReadyList(), prvCheckTasksWaitingTermination(), prvInitialiseTaskLists(), prvIsQueueEmpty(), prvIsQueueFull(), prvUnlockQueue(), uxQueueMessagesWaiting(), uxQueueSpacesAvailable(), vTaskSetTimeOutState(), xEventGroupClearBits(), xEventGroupSync(), xEventGroupWaitBits(), xQueueGenericReceive(), xQueueGenericReset(), xQueueGenericSend(), xQueuePeek(), xQueueReceive(), xQueueSemaphoreTake(), xStreamBufferReceive(), xStreamBufferSend(), xTaskCheckForTimeOut(), xTaskGetTickCount(), and xTaskResumeAll().
#define taskEXIT_CRITICAL | ( | ) | portEXIT_CRITICAL() |
Referenced by FreeRTOS_CLIRegisterCommand(), prvAddNewTaskToReadyList(), prvCheckTasksWaitingTermination(), prvInitialiseTaskLists(), prvIsQueueEmpty(), prvIsQueueFull(), prvUnlockQueue(), uxQueueMessagesWaiting(), uxQueueSpacesAvailable(), vTaskSetTimeOutState(), xEventGroupClearBits(), xEventGroupSync(), xEventGroupWaitBits(), xQueueGenericReceive(), xQueueGenericReset(), xQueueGenericSend(), xQueuePeek(), xQueueReceive(), xQueueSemaphoreTake(), xStreamBufferReceive(), xStreamBufferSend(), xTaskCheckForTimeOut(), xTaskGetTickCount(), and xTaskResumeAll().
#define taskSCHEDULER_NOT_STARTED 0 |
#define taskSCHEDULER_RUNNING 1 |
#define taskSCHEDULER_SUSPENDED 2 |
#define taskYIELD | ( | ) | portYIELD() |
#define tskIDLE_PRIORITY ( ( unsigned portBASE_TYPE ) 0U ) |
#define tskKERNEL_VERSION_NUMBER "V7.3.0" |
#define xTaskCreate | ( | pvTaskCode, | |
pcName, | |||
usStackDepth, | |||
pvParameters, | |||
uxPriority, | |||
pxCreatedTask | |||
) | xTaskGenericCreate( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), ( NULL ), ( NULL ) ) |
Referenced by main(), portTASK_FUNCTION(), sys_thread_new(), vAltStartComTestTasks(), vCreateAltBlockTimeTasks(), vCreateBlockTimeTasks(), vCreateSuicidalTasks(), vStartAltBlockingQueueTasks(), vStartAltGenericQueueTasks(), vStartAltPolledQueueTasks(), vStartBlockingQueueTasks(), vStartCountingSemaphoreTasks(), vStartDynamicPriorityTasks(), vStartGenericQueueTasks(), vStartIntegerMathTasks(), vStartLEDFlashTasks(), vStartMathTasks(), vStartPolledQueueTasks(), vStartQueuePeekTasks(), vStartRecursiveMutexTasks(), vStartSemaphoreTasks(), and vTaskStartScheduler().
#define xTaskCreateRestricted | ( | x, | |
pxCreatedTask | |||
) | xTaskGenericCreate( ((x)->pvTaskCode), ((x)->pcName), ((x)->usStackDepth), ((x)->pvParameters), ((x)->uxPriority), (pxCreatedTask), ((x)->puxStackBuffer), ((x)->xRegions) ) |
typedef struct xMEMORY_REGION xMemoryRegion |
typedef void* xTaskHandle |
typedef struct xTASK_PARAMTERS xTaskParameters |
typedef struct xTIME_OUT xTimeOutType |
enum eTaskState |
eTaskState eTaskStateGet | ( | xTaskHandle | pxTask | ) |
task.
h
eTaskState eTaskStateGet( xTaskHandle pxTask );
INCLUDE_eTaskStateGet 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.
pxTask | Handle of the task to be queried. |
signed char* pcTaskGetTaskName | ( | xTaskHandle | xTaskToQuery | ) |
unsigned portBASE_TYPE uxTaskGetNumberOfTasks | ( | void | ) |
unsigned portBASE_TYPE uxTaskGetStackHighWaterMark | ( | xTaskHandle | xTask | ) |
task.h
unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( xTaskHandle 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. |
unsigned portBASE_TYPE uxTaskGetTaskNumber | ( | xTaskHandle | xTask | ) |
unsigned portBASE_TYPE uxTaskPriorityGet | ( | xTaskHandle | pxTask | ) |
Referenced by portTASK_FUNCTION(), and prvLowPriorityMutexTask().
void vTaskAllocateMPURegions | ( | xTaskHandle | xTask, |
const xMemoryRegion *const | pxRegions | ||
) |
void vTaskDelay | ( | portTickType | xTicksToDelay | ) |
void vTaskDelayUntil | ( | portTickType *const | pxPreviousWakeTime, |
portTickType | xTimeIncrement | ||
) |
Referenced by portTASK_FUNCTION().
void vTaskDelete | ( | xTaskHandle | pxTaskToDelete | ) |
Referenced by portTASK_FUNCTION().
void vTaskEndScheduler | ( | void | ) |
void vTaskGetRunTimeStats | ( | signed char * | pcWriteBuffer | ) |
void vTaskIncrementTick | ( | void | ) |
void vTaskList | ( | signed char * | pcWriteBuffer | ) |
Referenced by task_monitor().
void vTaskMissedYield | ( | void | ) |
void vTaskPlaceOnEventList | ( | const xList *const | pxEventList, |
portTickType | xTicksToWait | ||
) |
void vTaskPlaceOnEventListRestricted | ( | const xList *const | pxEventList, |
portTickType | xTicksToWait | ||
) |
void vTaskPriorityDisinherit | ( | xTaskHandle *const | pxMutexHolder | ) |
Referenced by prvCopyDataToQueue().
void vTaskPriorityInherit | ( | xTaskHandle *const | pxMutexHolder | ) |
Referenced by xQueueGenericReceive().
void vTaskPrioritySet | ( | xTaskHandle | pxTask, |
unsigned portBASE_TYPE | uxNewPriority | ||
) |
Referenced by portTASK_FUNCTION(), prvLowPriorityMutexTask(), and vPrimaryBlockTimeTestTask().
void vTaskResume | ( | xTaskHandle | pxTaskToResume | ) |
void vTaskSetTaskNumber | ( | xTaskHandle | xTask, |
unsigned portBASE_TYPE | uxHandle | ||
) |
void vTaskSetTimeOutState | ( | xTimeOutType *const | pxTimeOut | ) |
void vTaskStartScheduler | ( | void | ) |
void vTaskStepTick | ( | portTickType | xTicksToJump | ) |
void vTaskSuspend | ( | xTaskHandle | pxTaskToSuspend | ) |
void vTaskSuspendAll | ( | void | ) |
void vTaskSwitchContext | ( | void | ) |
portBASE_TYPE xTaskCallApplicationTaskHook | ( | xTaskHandle | xTask, |
void * | pvParameter | ||
) |
task.h
portBASE_TYPE xTaskCallApplicationTaskHook( xTaskHandle xTask, pdTASK_HOOK_CODE pxHookFunction );
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.
portBASE_TYPE xTaskCheckForTimeOut | ( | xTimeOutType *const | pxTimeOut, |
portTickType *const | pxTicksToWait | ||
) |
signed portBASE_TYPE xTaskGenericCreate | ( | pdTASK_CODE | pxTaskCode, |
const signed char *const | pcName, | ||
unsigned short | usStackDepth, | ||
void * | pvParameters, | ||
unsigned portBASE_TYPE | uxPriority, | ||
xTaskHandle * | pxCreatedTask, | ||
portSTACK_TYPE * | puxStackBuffer, | ||
const xMemoryRegion *const | xRegions | ||
) |
xTaskHandle xTaskGetCurrentTaskHandle | ( | void | ) |
Referenced by xQueueGenericReceive(), xStreamBufferReceive(), and xStreamBufferSend().
xTaskHandle 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.
portBASE_TYPE xTaskGetSchedulerState | ( | void | ) |
portTickType xTaskGetTickCount | ( | void | ) |
portTickType xTaskGetTickCountFromISR | ( | void | ) |
signed portBASE_TYPE xTaskIsTaskSuspended | ( | xTaskHandle | xTask | ) |
task.
h
signed portBASE_TYPE xTaskIsTaskSuspended( xTaskHandle xTask );
Utility task that simply returns pdTRUE if the task referenced by xTask is currently in the Suspended state, or pdFALSE if the task referenced by xTask is in any other state.
signed portBASE_TYPE xTaskRemoveFromEventList | ( | const xList *const | pxEventList | ) |
signed portBASE_TYPE xTaskResumeAll | ( | void | ) |
portBASE_TYPE xTaskResumeFromISR | ( | xTaskHandle | pxTaskToResume | ) |