#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "include/FreeRTOS.h"
#include "include/task.h"
#include "include/timers.h"
#include "include/StackMacros.h"
Data Structures | |
struct | tskTaskControlBlock |
Macros | |
#define | MPU_WRAPPERS_INCLUDED_FROM_API_FILE |
#define | portRESET_READY_PRIORITY(uxPriority, uxTopReadyPriority) |
#define | prvAddTaskToReadyQueue(pxTCB) |
#define | prvCheckDelayedTasks() |
#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 | 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 pxTask, signed char *pcTaskName) |
void | vApplicationTickHook (void) |
This function is called by FreeRTOS each tick. More... | |
void | vTaskEndScheduler (void) |
void | vTaskIncrementTick (void) |
void | vTaskMissedYield (void) |
void | vTaskPlaceOnEventList (const 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) |
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 prvAddTaskToReadyQueue | ( | pxTCB | ) |
Referenced by prvInitialiseTaskLists(), xTaskRemoveFromEventList(), and xTaskResumeAll().
#define prvCheckDelayedTasks | ( | ) |
Referenced by vTaskIncrementTick().
#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 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 |
|
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, portALIGNMENT_ASSERT_pxCurrentTCB, portPOINTER_SIZE_TYPE, portPRIVILEGE_BIT, portSETUP_TCB, portYIELD_WITHIN_API, prvAddTaskToReadyQueue, prvAllocateTCBAndStack(), prvInitialiseTCBVariables(), pxCurrentTCB, pxPortInitialiseStack(), tskTaskControlBlock::pxStack, tskTaskControlBlock::pxTopOfStack, taskENTER_CRITICAL, taskEXIT_CRITICAL, traceTASK_CREATE, traceTASK_CREATE_FAILED, uxCurrentNumberOfTasks, tskTaskControlBlock::uxPriority, uxTaskNumber, uxTopUsedPriority, 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 | ) |
Referenced by task_monitor(), vCreateSuicidalTasks(), and xIsCreateTaskStillRunning().
void vApplicationStackOverflowHook | ( | xTaskHandle | pxTask, |
signed char * | pcTaskName | ||
) |
void vApplicationTickHook | ( | void | ) |
This function is called by FreeRTOS each tick.
Referenced by vTaskIncrementTick(), and xTaskIncrementTick().
void vTaskEndScheduler | ( | void | ) |
void vTaskIncrementTick | ( | void | ) |
Referenced by xTaskResumeAll().
void vTaskMissedYield | ( | void | ) |
Referenced by prvUnlockQueue().
void vTaskPlaceOnEventList | ( | const xList *const | pxEventList, |
portTickType | xTicksToWait | ||
) |
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 portTASK_FUNCTION(), prvCheckDelayedList(), vPrimaryBlockTimeTestTask(), and vSecondaryBlockTimeTestTask().
portTickType xTaskGetTickCountFromISR | ( | void | ) |
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 vTaskIncrementTick().
|
static |
Referenced by prvAddCurrentTaskToDelayedList(), prvInitialiseTaskLists(), and vTaskIncrementTick().
|
static |
Referenced by portTASK_FUNCTION(), and prvInitialiseTaskLists().
|
static |
Referenced by prvCheckTasksWaitingTermination(), prvInitialiseTaskLists(), uxTaskGetNumberOfTasks(), and xTaskResumeAll().
|
static |
Referenced by vTaskIncrementTick(), and xTaskResumeAll().
|
static |
Referenced by vTaskIncrementTick(), vTaskSuspendAll(), vTaskSwitchContext(), xTaskRemoveFromEventList(), and xTaskResumeAll().
|
static |
Referenced by prvInitialiseTaskLists().
|
static |
Referenced by vTaskPlaceOnEventList().
|
static |
Referenced by prvInitialiseTaskLists().
|
static |
Referenced by prvInitialiseTaskLists().
|
static |
Referenced by prvInitialiseTaskLists().
|
static |
Referenced by vTaskMissedYield(), vTaskSwitchContext(), and xTaskResumeAll().
|
static |
Referenced by portTASK_FUNCTION(), prvAddCurrentTaskToDelayedList(), and vTaskIncrementTick().
|
static |
Referenced by vTaskIncrementTick(), vTaskSetTimeOutState(), and xTaskCheckForTimeOut().
|
static |
Referenced by prvInitialiseTaskLists(), xTaskRemoveFromEventList(), and xTaskResumeAll().
|
static |
Referenced by prvInitialiseTaskLists(), vTaskEndScheduler(), and vTaskStartScheduler().
|
static |