uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tasks.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "FreeRTOS.h"
#include "task.h"
#include "StackMacros.h"

Go to the source code of this file.

Classes

struct  tskTaskControlBlock
 

Macros

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
 
#define tskIDLE_STACK_SIZE   configMINIMAL_STACK_SIZE
 
#define tskSTACK_FILL_BYTE   ( 0xa5 )
 
#define tskBLOCKED_CHAR   ( ( signed char ) 'B' )
 
#define tskREADY_CHAR   ( ( signed char ) 'R' )
 
#define tskDELETED_CHAR   ( ( signed char ) 'D' )
 
#define tskSUSPENDED_CHAR   ( ( signed char ) 'S' )
 
#define vWriteTraceToBuffer()
 
#define prvAddTaskToReadyQueue(pxTCB)
 
#define prvCheckDelayedTasks()
 
#define prvGetTCBFromHandle(pxHandle)   ( ( pxHandle == NULL ) ? ( tskTCB * ) pxCurrentTCB : ( tskTCB * ) pxHandle )
 

Typedefs

typedef struct tskTaskControlBlock tskTCB
 

Functions

void vTaskStartScheduler (void)
 
void vTaskEndScheduler (void)
 
void vTaskSuspendAll (void)
 
signed portBASE_TYPE xTaskResumeAll (void)
 
portTickType xTaskGetTickCount (void)
 
portTickType xTaskGetTickCountFromISR (void)
 
unsigned portBASE_TYPE uxTaskGetNumberOfTasks (void)
 
void vTaskIncrementTick (void)
 
void vTaskSwitchContext (void)
 
void vTaskPlaceOnEventList (const xList *const pxEventList, portTickType xTicksToWait)
 
signed portBASE_TYPE xTaskRemoveFromEventList (const xList *const pxEventList)
 
void vTaskSetTimeOutState (xTimeOutType *const pxTimeOut)
 
portBASE_TYPE xTaskCheckForTimeOut (xTimeOutType *const pxTimeOut, portTickType *const pxTicksToWait)
 
void vTaskMissedYield (void)
 

Variables

PRIVILEGED_DATA tskTCB *volatile pxCurrentTCB = NULL
 

Macro Definition Documentation

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE

Definition at line 62 of file tasks.c.

#define prvAddTaskToReadyQueue (   pxTCB)
Value:
{ \
if( pxTCB->uxPriority > uxTopReadyPriority ) \
{ \
uxTopReadyPriority = pxTCB->uxPriority; \
} \
vListInsertEnd( ( xList * ) &( pxReadyTasksLists[ pxTCB->uxPriority ] ), &( pxTCB->xGenericListItem ) ); \
}

Definition at line 254 of file tasks.c.

#define prvCheckDelayedTasks ( )
Value:
{ \
register tskTCB *pxTCB; \
\
while( ( pxTCB = ( tskTCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ) ) != NULL ) \
{ \
if( xTickCount < listGET_LIST_ITEM_VALUE( &( pxTCB->xGenericListItem ) ) ) \
{ \
break; \
} \
vListRemove( &( pxTCB->xGenericListItem ) ); \
/* Is the task waiting on an event also? */ \
if( pxTCB->xEventListItem.pvContainer ) \
{ \
vListRemove( &( pxTCB->xEventListItem ) ); \
} \
prvAddTaskToReadyQueue( pxTCB ); \
} \
}

Definition at line 272 of file tasks.c.

#define prvGetTCBFromHandle (   pxHandle)    ( ( pxHandle == NULL ) ? ( tskTCB * ) pxCurrentTCB : ( tskTCB * ) pxHandle )

Definition at line 299 of file tasks.c.

#define tskBLOCKED_CHAR   ( ( signed char ) 'B' )

Definition at line 188 of file tasks.c.

#define tskDELETED_CHAR   ( ( signed char ) 'D' )

Definition at line 190 of file tasks.c.

#define tskIDLE_STACK_SIZE   configMINIMAL_STACK_SIZE

Definition at line 73 of file tasks.c.

#define tskREADY_CHAR   ( ( signed char ) 'R' )

Definition at line 189 of file tasks.c.

#define tskSTACK_FILL_BYTE   ( 0xa5 )

Definition at line 183 of file tasks.c.

#define tskSUSPENDED_CHAR   ( ( signed char ) 'S' )

Definition at line 191 of file tasks.c.

#define vWriteTraceToBuffer ( )

Definition at line 242 of file tasks.c.

Typedef Documentation

typedef struct tskTaskControlBlock tskTCB

Function Documentation

unsigned portBASE_TYPE uxTaskGetNumberOfTasks ( void  )

Definition at line 1213 of file tasks.c.

void vTaskEndScheduler ( void  )

Definition at line 1091 of file tasks.c.

void vTaskIncrementTick ( void  )

Definition at line 1401 of file tasks.c.

void vTaskMissedYield ( void  )

Definition at line 1819 of file tasks.c.

void vTaskPlaceOnEventList ( const xList *const  pxEventList,
portTickType  xTicksToWait 
)

Definition at line 1652 of file tasks.c.

void vTaskSetTimeOutState ( xTimeOutType *const  pxTimeOut)

Definition at line 1769 of file tasks.c.

void vTaskStartScheduler ( void  )

Definition at line 1049 of file tasks.c.

void vTaskSuspendAll ( void  )

Definition at line 1102 of file tasks.c.

void vTaskSwitchContext ( void  )

Definition at line 1597 of file tasks.c.

portBASE_TYPE xTaskCheckForTimeOut ( xTimeOutType *const  pxTimeOut,
portTickType *const  pxTicksToWait 
)

Definition at line 1776 of file tasks.c.

portTickType xTaskGetTickCount ( void  )

Definition at line 1192 of file tasks.c.

portTickType xTaskGetTickCountFromISR ( void  )

Definition at line 1207 of file tasks.c.

signed portBASE_TYPE xTaskRemoveFromEventList ( const xList *const  pxEventList)

Definition at line 1722 of file tasks.c.

signed portBASE_TYPE xTaskResumeAll ( void  )

Definition at line 1110 of file tasks.c.

Variable Documentation

PRIVILEGED_DATA tskTCB* volatile pxCurrentTCB = NULL

Definition at line 133 of file tasks.c.