#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 xTask, signed char *pcTaskName) |
void | vApplicationTickHook (void) |
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, pxDelayedTaskList, pxOverflowDelayedTaskList, vListInsert(), 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(), prvInitialiseTaskLists(), prvInitialiseTCBVariables(), pxCurrentTCB, pxPortInitialiseStack(), tskTaskControlBlock::pxStack, tskTaskControlBlock::pxTopOfStack, taskENTER_CRITICAL, taskEXIT_CRITICAL, traceTASK_CREATE, traceTASK_CREATE_FAILED, uxCurrentNumberOfTasks, tskTaskControlBlock::uxPriority, uxTaskNumber, uxTopUsedPriority, xSchedulerRunning, and xTaskHandle.
|
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 | ) |
References uxCurrentNumberOfTasks.
void vApplicationStackOverflowHook | ( | xTaskHandle | xTask, |
signed char * | pcTaskName | ||
) |
void vApplicationTickHook | ( | void | ) |
void vTaskEndScheduler | ( | void | ) |
References pdFALSE, vPortEndScheduler(), and xSchedulerRunning.
void vTaskIncrementTick | ( | void | ) |
Referenced by xTaskResumeAll().
void vTaskMissedYield | ( | void | ) |
References pdTRUE, and xMissedYield.
void vTaskPlaceOnEventList | ( | const xList *const | pxEventList, |
portTickType | xTicksToWait | ||
) |
void vTaskSetTimeOutState | ( | xTimeOutType *const | pxTimeOut | ) |
References configASSERT, xNumOfOverflows, xTIME_OUT::xOverflowCount, xTickCount, and xTIME_OUT::xTimeOnEntering.
void vTaskStartScheduler | ( | void | ) |
void vTaskSuspendAll | ( | void | ) |
References uxSchedulerSuspended.
void vTaskSwitchContext | ( | void | ) |
portBASE_TYPE xTaskCheckForTimeOut | ( | xTimeOutType *const | pxTimeOut, |
portTickType *const | pxTicksToWait | ||
) |
portTickType xTaskGetTickCount | ( | void | ) |
References portTickType, taskENTER_CRITICAL, taskEXIT_CRITICAL, and xTickCount.
portTickType xTaskGetTickCountFromISR | ( | void | ) |
References portCLEAR_INTERRUPT_MASK_FROM_ISR, portSET_INTERRUPT_MASK_FROM_ISR, portTickType, and xTickCount.
signed portBASE_TYPE xTaskRemoveFromEventList | ( | const xList *const | pxEventList | ) |
signed portBASE_TYPE xTaskResumeAll | ( | void | ) |
References configASSERT, listGET_OWNER_OF_HEAD_ENTRY, listLIST_IS_EMPTY, pdFALSE, pdTRUE, portYIELD_WITHIN_API, prvAddTaskToReadyQueue, taskENTER_CRITICAL, taskEXIT_CRITICAL, uxCurrentNumberOfTasks, uxListRemove(), uxMissedTicks, tskTaskControlBlock::uxPriority, uxSchedulerSuspended, vTaskIncrementTick(), tskTaskControlBlock::xEventListItem, tskTaskControlBlock::xGenericListItem, xMissedYield, and xPendingReadyList.
PRIVILEGED_DATA tskTCB* volatile pxCurrentTCB = NULL |
|
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 |