#include <stdlib.h>
#include <string.h>
#include "FreeRTOS.h"
#include "task.h"
#include "timers.h"
#include "StackMacros.h"
Data Structures | |
struct | tskTaskControlBlock |
Macros | |
#define | MPU_WRAPPERS_INCLUDED_FROM_API_FILE |
#define | portRESET_READY_PRIORITY(uxPriority, uxTopReadyPriority) |
#define | prvAddTaskToReadyList(pxTCB) |
#define | prvGetTCBFromHandle(pxHandle) ( ( ( pxHandle ) == NULL ) ? ( tskTCB * ) pxCurrentTCB : ( tskTCB * ) ( pxHandle ) ) |
#define | taskRECORD_READY_PRIORITY(uxPriority) |
#define | taskRESET_READY_PRIORITY(uxPriority) |
#define | taskSELECT_HIGHEST_PRIORITY_TASK() |
#define | taskSWITCH_DELAYED_LISTS() |
#define | tskBLOCKED_CHAR ( ( signed char ) 'B' ) |
#define | tskDELETED_CHAR ( ( signed char ) 'D' ) |
#define | tskIDLE_STACK_SIZE configMINIMAL_STACK_SIZE |
#define | tskREADY_CHAR ( ( signed char ) 'R' ) |
#define | tskSTACK_FILL_BYTE ( 0xa5U ) |
#define | tskSUSPENDED_CHAR ( ( signed char ) 'S' ) |
Typedefs | |
typedef struct tskTaskControlBlock | tskTCB |
Functions | |
static | portTASK_FUNCTION (prvIdleTask, pvParameters) |
static void | prvAddCurrentTaskToDelayedList (portTickType xTimeToWake) |
static tskTCB * | prvAllocateTCBAndStack (unsigned short usStackDepth, portSTACK_TYPE *puxStackBuffer) |
static void | prvCheckTasksWaitingTermination (void) |
static void | prvInitialiseTaskLists (static void prvCheckTasksWaitingTermination void) |
static void | prvInitialiseTaskLists (void) |
static void | prvInitialiseTCBVariables (tskTCB *pxTCB, const signed char *const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion *const xRegions, unsigned short usStackDepth) PRIVILEGED_FUNCTION |
unsigned portBASE_TYPE | uxTaskGetNumberOfTasks (void) |
void | vApplicationStackOverflowHook (xTaskHandle xTask, signed char *pcTaskName) |
void | vApplicationTickHook (void) |
void | vTaskEndScheduler (void) |
void | vTaskMissedYield (void) |
void | vTaskPlaceOnEventList (xList *const pxEventList, portTickType xTicksToWait) |
void | vTaskSetTimeOutState (xTimeOutType *const pxTimeOut) |
void | vTaskStartScheduler (void) |
void | vTaskSuspendAll (void) |
void | vTaskSwitchContext (void) |
portBASE_TYPE | xTaskCheckForTimeOut (xTimeOutType *const pxTimeOut, portTickType *const pxTicksToWait) |
portTickType | xTaskGetTickCount (void) |
portTickType | xTaskGetTickCountFromISR (void) |
portBASE_TYPE | xTaskIncrementTick (void) |
signed portBASE_TYPE | xTaskRemoveFromEventList (const xList *const pxEventList) |
signed portBASE_TYPE | xTaskResumeAll (void) |
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE |
#define portRESET_READY_PRIORITY | ( | uxPriority, | |
uxTopReadyPriority | |||
) |
Referenced by vTaskPlaceOnEventList().
#define prvAddTaskToReadyList | ( | pxTCB | ) |
Referenced by prvInitialiseTaskLists(), xTaskIncrementTick(), xTaskRemoveFromEventList(), and xTaskResumeAll().
#define prvGetTCBFromHandle | ( | pxHandle | ) | ( ( ( pxHandle ) == NULL ) ? ( tskTCB * ) pxCurrentTCB : ( tskTCB * ) ( pxHandle ) ) |
#define taskRECORD_READY_PRIORITY | ( | uxPriority | ) |
#define taskRESET_READY_PRIORITY | ( | uxPriority | ) |
#define taskSELECT_HIGHEST_PRIORITY_TASK | ( | ) |
Referenced by vTaskSwitchContext().
#define taskSWITCH_DELAYED_LISTS | ( | ) |
Referenced by xTaskIncrementTick().
#define tskBLOCKED_CHAR ( ( signed char ) 'B' ) |
#define tskDELETED_CHAR ( ( signed char ) 'D' ) |
#define tskIDLE_STACK_SIZE configMINIMAL_STACK_SIZE |
Referenced by vTaskStartScheduler().
#define tskREADY_CHAR ( ( signed char ) 'R' ) |
#define tskSTACK_FILL_BYTE ( 0xa5U ) |
Referenced by prvAllocateTCBAndStack().
#define tskSUSPENDED_CHAR ( ( signed char ) 'S' ) |
typedef struct tskTaskControlBlock tskTCB |
|
static |
References configASSERT, configEXPECTED_IDLE_TIME_BEFORE_SLEEP, listCURRENT_LIST_LENGTH, portSUPPRESS_TICKS_AND_SLEEP, portTickType, prvCheckTasksWaitingTermination(), pxReadyTasksLists, taskYIELD, traceLOW_POWER_IDLE_BEGIN, traceLOW_POWER_IDLE_END, vTaskSuspendAll(), xNextTaskUnblockTime, xTaskResumeAll(), and xTickCount.
|
static |
References listSET_LIST_ITEM_VALUE, pxCurrentTCB, pxDelayedTaskList, pxOverflowDelayedTaskList, vListInsert(), tskTaskControlBlock::xGenericListItem, xNextTaskUnblockTime, and xTickCount.
Referenced by vTaskPlaceOnEventList().
|
static |
References NULL, pvPortMalloc(), pvPortMallocAligned, tskTaskControlBlock::pxStack, tskSTACK_FILL_BYTE, and vPortFree().
Referenced by prvInitialiseTaskLists().
|
static |
|
static |
References configASSERT, errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY, NULL, pdFALSE, pdPASS, pdTRUE, portPOINTER_SIZE_TYPE, portPRIVILEGE_BIT, portSETUP_TCB, portYIELD_WITHIN_API, prvAddTaskToReadyList, prvAllocateTCBAndStack(), prvInitialiseTCBVariables(), pxCurrentTCB, pxPortInitialiseStack(), tskTaskControlBlock::pxStack, tskTaskControlBlock::pxTopOfStack, taskENTER_CRITICAL, taskEXIT_CRITICAL, traceTASK_CREATE, traceTASK_CREATE_FAILED, uxCurrentNumberOfTasks, tskTaskControlBlock::uxPriority, uxTaskNumber, xSchedulerRunning, and xTaskHandle.
Referenced by prvAddNewTaskToReadyList(), and prvInitialiseTaskLists().
|
static |
|
static |
References configMAX_TASK_NAME_LEN, listSET_LIST_ITEM_OWNER, listSET_LIST_ITEM_VALUE, NULL, tskTaskControlBlock::pcTaskName, portTickType, tskTaskControlBlock::pxStack, tskTaskControlBlock::uxPriority, vListInitialiseItem(), tskTaskControlBlock::xEventListItem, and tskTaskControlBlock::xGenericListItem.
Referenced by prvInitialiseTaskLists().
unsigned portBASE_TYPE uxTaskGetNumberOfTasks | ( | void | ) |
void vApplicationStackOverflowHook | ( | xTaskHandle | xTask, |
signed char * | pcTaskName | ||
) |
void vApplicationTickHook | ( | void | ) |
Referenced by vTaskIncrementTick(), and xTaskIncrementTick().
void vTaskEndScheduler | ( | void | ) |
void vTaskMissedYield | ( | void | ) |
Referenced by prvUnlockQueue().
void vTaskPlaceOnEventList | ( | xList *const | pxEventList, |
portTickType | xTicksToWait | ||
) |
References configASSERT, portRESET_READY_PRIORITY, portTickType, prvAddCurrentTaskToDelayedList(), pxCurrentTCB, uxListRemove(), tskTaskControlBlock::uxPriority, uxTopReadyPriority, vListInsert(), vListInsertEnd(), tskTaskControlBlock::xEventListItem, tskTaskControlBlock::xGenericListItem, and xTickCount.
Referenced by xQueueGenericReceive(), xQueueGenericSend(), xQueuePeek(), xQueueReceive(), and xQueueSemaphoreTake().
void vTaskSetTimeOutState | ( | xTimeOutType *const | pxTimeOut | ) |
Referenced by xQueueGenericReceive(), xQueueGenericSend(), xStreamBufferSend(), and xTaskCheckForTimeOut().
void vTaskStartScheduler | ( | void | ) |
Referenced by main().
void vTaskSuspendAll | ( | void | ) |
void vTaskSwitchContext | ( | void | ) |
portBASE_TYPE xTaskCheckForTimeOut | ( | xTimeOutType *const | pxTimeOut, |
portTickType *const | pxTicksToWait | ||
) |
Referenced by xQueueGenericReceive(), xQueueGenericSend(), xQueuePeek(), xQueueReceive(), xQueueSemaphoreTake(), and xStreamBufferSend().
portTickType xTaskGetTickCount | ( | void | ) |
Referenced by prvCheckDelayedList().
portTickType xTaskGetTickCountFromISR | ( | void | ) |
portBASE_TYPE xTaskIncrementTick | ( | void | ) |
Referenced by xTaskResumeAll().
signed portBASE_TYPE xTaskRemoveFromEventList | ( | const xList *const | pxEventList | ) |
signed portBASE_TYPE xTaskResumeAll | ( | void | ) |
PRIVILEGED_DATA tskTCB* volatile pxCurrentTCB = NULL |
Referenced by prvAddCurrentTaskToDelayedList(), prvAddNewTaskToReadyList(), prvInitialiseTaskLists(), uxTaskResetEventItemValue(), vTaskPlaceOnEventList(), vTaskPlaceOnUnorderedEventList(), vTaskRemoveFromUnorderedEventList(), vTaskStartScheduler(), vTaskSwitchContext(), xTaskCheckForTimeOut(), xTaskIncrementTick(), xTaskRemoveFromEventList(), xTaskRemoveFromUnorderedEventList(), and xTaskResumeAll().
|
static |
Referenced by prvAddCurrentTaskToDelayedList(), prvInitialiseTaskLists(), and xTaskIncrementTick().
|
static |
Referenced by prvAddCurrentTaskToDelayedList(), and prvInitialiseTaskLists().
|
static |
Referenced by portTASK_FUNCTION(), prvInitialiseTaskLists(), and xTaskIncrementTick().
|
static |
Referenced by prvCheckTasksWaitingTermination(), prvInitialiseTaskLists(), uxTaskGetNumberOfTasks(), and xTaskResumeAll().
|
static |
Referenced by xTaskIncrementTick(), and xTaskResumeAll().
|
static |
Referenced by vTaskSuspendAll(), vTaskSwitchContext(), xTaskIncrementTick(), xTaskRemoveFromEventList(), and xTaskResumeAll().
|
static |
Referenced by prvInitialiseTaskLists().
|
static |
Referenced by vTaskPlaceOnEventList().
|
static |
Referenced by prvInitialiseTaskLists().
|
static |
Referenced by prvInitialiseTaskLists().
|
static |
Referenced by portTASK_FUNCTION(), prvAddCurrentTaskToDelayedList(), and xTaskIncrementTick().
|
static |
Referenced by vTaskSetTimeOutState(), and xTaskCheckForTimeOut().
|
static |
Referenced by prvInitialiseTaskLists(), xTaskRemoveFromEventList(), and xTaskResumeAll().
|
static |
Referenced by prvInitialiseTaskLists(), vTaskEndScheduler(), and vTaskStartScheduler().
|
static |
|
static |
Referenced by vTaskMissedYield(), vTaskSwitchContext(), and xTaskResumeAll().