FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tasks.c File Reference

Data Structures

struct  tskTCB
 

Macros

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
 
#define taskYIELD_IF_USING_PREEMPTION()
 
#define taskNOT_WAITING_NOTIFICATION
 
#define taskWAITING_NOTIFICATION
 
#define taskNOTIFICATION_RECEIVED
 
#define tskSTACK_FILL_BYTE
 
#define tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB
 
#define tskSTATICALLY_ALLOCATED_STACK_ONLY
 
#define tskSTATICALLY_ALLOCATED_STACK_AND_TCB
 
#define tskSET_NEW_STACKS_TO_KNOWN_VALUE
 
#define tskRUNNING_CHAR
 
#define tskBLOCKED_CHAR
 
#define tskREADY_CHAR
 
#define tskDELETED_CHAR
 
#define tskSUSPENDED_CHAR
 
#define configIDLE_TASK_NAME
 
#define taskRECORD_READY_PRIORITY(uxPriority)
 
#define taskSELECT_HIGHEST_PRIORITY_TASK()
 
#define taskRESET_READY_PRIORITY(uxPriority)
 
#define portRESET_READY_PRIORITY(uxPriority, uxTopReadyPriority)
 
#define taskSWITCH_DELAYED_LISTS()
 
#define prvAddTaskToReadyList(pxTCB)
 
#define prvGetTCBFromHandle(pxHandle)
 
#define taskEVENT_LIST_ITEM_VALUE_IN_USE
 

Typedefs

typedef tskTCB TCB_t
 

Functions

static void prvInitialiseTaskLists (static void prvCheckTasksWaitingTermination void)
 
static void prvAddNewTaskToReadyList (TCB_t *pxNewTCB)
 
void vTaskStartScheduler (void)
 
void vTaskEndScheduler (void)
 
void vTaskSuspendAll (void)
 
BaseType_t xTaskResumeAll (void)
 
TickType_t xTaskGetTickCount (void)
 
TickType_t xTaskGetTickCountFromISR (void)
 
UBaseType_t uxTaskGetNumberOfTasks (void)
 
char * pcTaskGetName (TaskHandle_t xTaskToQuery)
 
BaseType_t xTaskCatchUpTicks (TickType_t xTicksToCatchUp)
 
BaseType_t xTaskIncrementTick (void)
 
void vTaskSwitchContext (void)
 
void vTaskPlaceOnEventList (List_t *const pxEventList, const TickType_t xTicksToWait)
 
void vTaskPlaceOnUnorderedEventList (List_t *pxEventList, const TickType_t xItemValue, const TickType_t xTicksToWait)
 
BaseType_t xTaskRemoveFromEventList (const List_t *const pxEventList)
 
void vTaskRemoveFromUnorderedEventList (ListItem_t *pxEventListItem, const TickType_t xItemValue)
 
void vTaskSetTimeOutState (TimeOut_t *const pxTimeOut)
 
void vTaskInternalSetTimeOutState (TimeOut_t *const pxTimeOut)
 
BaseType_t xTaskCheckForTimeOut (TimeOut_t *const pxTimeOut, TickType_t *const pxTicksToWait)
 
void vTaskMissedYield (void)
 
static portTASK_FUNCTION (prvIdleTask, pvParameters)
 
static void prvInitialiseTaskLists (void)
 
static void prvCheckTasksWaitingTermination (void)
 
static void prvResetNextTaskUnblockTime (void)
 
TickType_t uxTaskResetEventItemValue (void)
 
static void prvAddCurrentTaskToDelayedList (TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely)
 

Variables

PRIVILEGED_DATA TCB_t *volatile pxCurrentTCB
 
static PRIVILEGED_DATA List_t pxReadyTasksLists [configMAX_PRIORITIES]
 
static PRIVILEGED_DATA List_t xDelayedTaskList1
 
static PRIVILEGED_DATA List_t xDelayedTaskList2
 
static PRIVILEGED_DATA List_t
*volatile 
pxDelayedTaskList
 
static PRIVILEGED_DATA List_t
*volatile 
pxOverflowDelayedTaskList
 
static PRIVILEGED_DATA List_t xPendingReadyList
 
static PRIVILEGED_DATA
volatile UBaseType_t 
uxCurrentNumberOfTasks
 
static PRIVILEGED_DATA
volatile TickType_t 
xTickCount
 
static PRIVILEGED_DATA
volatile UBaseType_t 
uxTopReadyPriority
 
static PRIVILEGED_DATA
volatile BaseType_t 
xSchedulerRunning
 
static PRIVILEGED_DATA
volatile TickType_t 
xPendedTicks
 
static PRIVILEGED_DATA
volatile BaseType_t 
xYieldPending
 
static PRIVILEGED_DATA
volatile BaseType_t 
xNumOfOverflows
 
static PRIVILEGED_DATA UBaseType_t uxTaskNumber
 
static PRIVILEGED_DATA
volatile TickType_t 
xNextTaskUnblockTime
 
static PRIVILEGED_DATA TaskHandle_t xIdleTaskHandle
 
static PRIVILEGED_DATA
volatile UBaseType_t 
uxSchedulerSuspended
 

Macro Definition Documentation

#define configIDLE_TASK_NAME

Referenced by vTaskStartScheduler().

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
#define portRESET_READY_PRIORITY (   uxPriority,
  uxTopReadyPriority 
)
#define prvGetTCBFromHandle (   pxHandle)

Referenced by pcTaskGetName().

#define taskEVENT_LIST_ITEM_VALUE_IN_USE
#define taskNOT_WAITING_NOTIFICATION
#define taskNOTIFICATION_RECEIVED
#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 taskWAITING_NOTIFICATION
#define taskYIELD_IF_USING_PREEMPTION ( )
#define tskBLOCKED_CHAR
#define tskDELETED_CHAR
#define tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB
#define tskREADY_CHAR
#define tskRUNNING_CHAR
#define tskSET_NEW_STACKS_TO_KNOWN_VALUE
#define tskSTACK_FILL_BYTE
#define tskSTATICALLY_ALLOCATED_STACK_AND_TCB
#define tskSTATICALLY_ALLOCATED_STACK_ONLY
#define tskSUSPENDED_CHAR

Typedef Documentation

typedef tskTCB TCB_t

Function Documentation

char* pcTaskGetName ( TaskHandle_t  xTaskToQuery)
static void prvCheckTasksWaitingTermination ( void  )
static
static void prvInitialiseTaskLists ( static void prvCheckTasksWaitingTermination  void)
static

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.

Referenced by prvAddNewTaskToReadyList().

static void prvResetNextTaskUnblockTime ( void  )
static
UBaseType_t uxTaskGetNumberOfTasks ( void  )
void vTaskEndScheduler ( void  )
void vTaskMissedYield ( void  )

References pdTRUE, and xYieldPending.

Referenced by prvUnlockQueue().

void vTaskPlaceOnEventList ( List_t *const  pxEventList,
const TickType_t  xTicksToWait 
)
BaseType_t xTaskCatchUpTicks ( TickType_t  xTicksToCatchUp)
TickType_t xTaskGetTickCount ( void  )

Variable Documentation

PRIVILEGED_DATA List_t* volatile pxOverflowDelayedTaskList
static
PRIVILEGED_DATA UBaseType_t uxTaskNumber
static
PRIVILEGED_DATA volatile UBaseType_t uxTopReadyPriority
static
PRIVILEGED_DATA List_t xDelayedTaskList1
static

Referenced by prvInitialiseTaskLists().

PRIVILEGED_DATA List_t xDelayedTaskList2
static

Referenced by prvInitialiseTaskLists().

PRIVILEGED_DATA TaskHandle_t xIdleTaskHandle
static

Referenced by vTaskStartScheduler().

PRIVILEGED_DATA volatile TickType_t xPendedTicks
static
PRIVILEGED_DATA volatile BaseType_t xSchedulerRunning
static