uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
task.h File Reference
#include "list.h"

Go to the source code of this file.

Classes

struct  xTIME_OUT
 
struct  xMEMORY_REGION
 
struct  xTASK_PARAMTERS
 
struct  xTASK_STATUS
 

Macros

#define tskKERNEL_VERSION_NUMBER   "V7.5.3"
 
#define tskIDLE_PRIORITY   ( ( unsigned portBASE_TYPE ) 0U )
 
#define taskYIELD()   portYIELD()
 
#define taskENTER_CRITICAL()   portENTER_CRITICAL()
 
#define taskEXIT_CRITICAL()   portEXIT_CRITICAL()
 
#define taskDISABLE_INTERRUPTS()   portDISABLE_INTERRUPTS()
 
#define taskENABLE_INTERRUPTS()   portENABLE_INTERRUPTS()
 
#define taskSCHEDULER_NOT_STARTED   ( ( portBASE_TYPE ) 0 )
 
#define taskSCHEDULER_RUNNING   ( ( portBASE_TYPE ) 1 )
 
#define taskSCHEDULER_SUSPENDED   ( ( portBASE_TYPE ) 2 )
 
#define xTaskCreate(pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask)   xTaskGenericCreate( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), ( NULL ), ( NULL ) )
 
#define xTaskCreateRestricted(x, pxCreatedTask)   xTaskGenericCreate( ((x)->pvTaskCode), ((x)->pcName), ((x)->usStackDepth), ((x)->pvParameters), ((x)->uxPriority), (pxCreatedTask), ((x)->puxStackBuffer), ((x)->xRegions) )
 

Typedefs

typedef void * xTaskHandle
 
typedef struct xTIME_OUT xTimeOutType
 
typedef struct xMEMORY_REGION xMemoryRegion
 
typedef struct xTASK_PARAMTERS xTaskParameters
 
typedef struct xTASK_STATUS xTaskStatusType
 

Enumerations

enum  eTaskState {
  eRunning = 0, eReady, eBlocked, eSuspended,
  eDeleted
}
 
enum  eSleepModeStatus { eAbortSleep = 0, eStandardSleep, eNoTasksWaitingTimeout }
 

Functions

void vTaskAllocateMPURegions (xTaskHandle xTask, const xMemoryRegion *const pxRegions) PRIVILEGED_FUNCTION
 
void vTaskDelete (xTaskHandle xTaskToDelete) PRIVILEGED_FUNCTION
 
void vTaskDelay (portTickType xTicksToDelay) PRIVILEGED_FUNCTION
 
void vTaskDelayUntil (portTickType *const pxPreviousWakeTime, portTickType xTimeIncrement) PRIVILEGED_FUNCTION
 
unsigned portBASE_TYPE uxTaskPriorityGet (xTaskHandle xTask) PRIVILEGED_FUNCTION
 
eTaskState eTaskGetState (xTaskHandle xTask) PRIVILEGED_FUNCTION
 
void vTaskPrioritySet (xTaskHandle xTask, unsigned portBASE_TYPE uxNewPriority) PRIVILEGED_FUNCTION
 
void vTaskSuspend (xTaskHandle xTaskToSuspend) PRIVILEGED_FUNCTION
 
void vTaskResume (xTaskHandle xTaskToResume) PRIVILEGED_FUNCTION
 
portBASE_TYPE xTaskResumeFromISR (xTaskHandle xTaskToResume) PRIVILEGED_FUNCTION
 
void vTaskStartScheduler (void) PRIVILEGED_FUNCTION
 
void vTaskEndScheduler (void) PRIVILEGED_FUNCTION
 
void vTaskSuspendAll (void) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xTaskResumeAll (void) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xTaskIsTaskSuspended (xTaskHandle xTask) PRIVILEGED_FUNCTION
 
portTickType xTaskGetTickCount (void) PRIVILEGED_FUNCTION
 
portTickType xTaskGetTickCountFromISR (void) PRIVILEGED_FUNCTION
 
unsigned portBASE_TYPE uxTaskGetNumberOfTasks (void) PRIVILEGED_FUNCTION
 
signed char * pcTaskGetTaskName (xTaskHandle xTaskToQuery)
 
unsigned portBASE_TYPE uxTaskGetStackHighWaterMark (xTaskHandle xTask) PRIVILEGED_FUNCTION
 
portBASE_TYPE xTaskCallApplicationTaskHook (xTaskHandle xTask, void *pvParameter) PRIVILEGED_FUNCTION
 
xTaskHandle xTaskGetIdleTaskHandle (void)
 
unsigned portBASE_TYPE uxTaskGetSystemState (xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime)
 
void vTaskList (signed char *pcWriteBuffer) PRIVILEGED_FUNCTION
 
void vTaskGetRunTimeStats (signed char *pcWriteBuffer) PRIVILEGED_FUNCTION
 
portBASE_TYPE xTaskIncrementTick (void) PRIVILEGED_FUNCTION
 
void vTaskPlaceOnEventList (xList *const pxEventList, portTickType xTicksToWait) PRIVILEGED_FUNCTION
 
void vTaskPlaceOnEventListRestricted (xList *const pxEventList, portTickType xTicksToWait) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xTaskRemoveFromEventList (const xList *const pxEventList) PRIVILEGED_FUNCTION
 
void vTaskSwitchContext (void) PRIVILEGED_FUNCTION
 
xTaskHandle xTaskGetCurrentTaskHandle (void) PRIVILEGED_FUNCTION
 
void vTaskSetTimeOutState (xTimeOutType *const pxTimeOut) PRIVILEGED_FUNCTION
 
portBASE_TYPE xTaskCheckForTimeOut (xTimeOutType *const pxTimeOut, portTickType *const pxTicksToWait) PRIVILEGED_FUNCTION
 
void vTaskMissedYield (void) PRIVILEGED_FUNCTION
 
portBASE_TYPE xTaskGetSchedulerState (void) PRIVILEGED_FUNCTION
 
void vTaskPriorityInherit (xTaskHandle const pxMutexHolder) PRIVILEGED_FUNCTION
 
void vTaskPriorityDisinherit (xTaskHandle const pxMutexHolder) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xTaskGenericCreate (pdTASK_CODE pxTaskCode, const signed char *const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion *const xRegions) PRIVILEGED_FUNCTION
 
unsigned portBASE_TYPE uxTaskGetTaskNumber (xTaskHandle xTask)
 
void vTaskSetTaskNumber (xTaskHandle xTask, unsigned portBASE_TYPE uxHandle)
 
void vTaskStepTick (portTickType xTicksToJump)
 
eSleepModeStatus eTaskConfirmSleepModeStatus (void)
 

Macro Definition Documentation

#define taskDISABLE_INTERRUPTS ( )    portDISABLE_INTERRUPTS()

Definition at line 217 of file task.h.

#define taskENABLE_INTERRUPTS ( )    portENABLE_INTERRUPTS()

Definition at line 227 of file task.h.

#define taskENTER_CRITICAL ( )    portENTER_CRITICAL()

Definition at line 193 of file task.h.

#define taskEXIT_CRITICAL ( )    portEXIT_CRITICAL()

Definition at line 207 of file task.h.

#define taskSCHEDULER_NOT_STARTED   ( ( portBASE_TYPE ) 0 )

Definition at line 230 of file task.h.

#define taskSCHEDULER_RUNNING   ( ( portBASE_TYPE ) 1 )

Definition at line 231 of file task.h.

#define taskSCHEDULER_SUSPENDED   ( ( portBASE_TYPE ) 2 )

Definition at line 232 of file task.h.

#define taskYIELD ( )    portYIELD()

Definition at line 179 of file task.h.

#define tskIDLE_PRIORITY   ( ( unsigned portBASE_TYPE ) 0U )

Definition at line 169 of file task.h.

#define tskKERNEL_VERSION_NUMBER   "V7.5.3"

Definition at line 84 of file task.h.

#define xTaskCreate (   pvTaskCode,
  pcName,
  usStackDepth,
  pvParameters,
  uxPriority,
  pxCreatedTask 
)    xTaskGenericCreate( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), ( NULL ), ( NULL ) )

Definition at line 314 of file task.h.

#define xTaskCreateRestricted (   x,
  pxCreatedTask 
)    xTaskGenericCreate( ((x)->pvTaskCode), ((x)->pcName), ((x)->usStackDepth), ((x)->pvParameters), ((x)->uxPriority), (pxCreatedTask), ((x)->puxStackBuffer), ((x)->xRegions) )

Definition at line 383 of file task.h.

Typedef Documentation

typedef struct xMEMORY_REGION xMemoryRegion
typedef void* xTaskHandle

Definition at line 96 of file task.h.

typedef struct xTASK_STATUS xTaskStatusType
typedef struct xTIME_OUT xTimeOutType

Enumeration Type Documentation

Enumerator
eAbortSleep 
eStandardSleep 
eNoTasksWaitingTimeout 

Definition at line 156 of file task.h.

enum eTaskState
Enumerator
eRunning 
eReady 
eBlocked 
eSuspended 
eDeleted 

Definition at line 99 of file task.h.

Function Documentation

eSleepModeStatus eTaskConfirmSleepModeStatus ( void  )
eTaskState eTaskGetState ( xTaskHandle  xTask)

task. h

eTaskState eTaskGetState( xTaskHandle xTask );

INCLUDE_eTaskGetState must be defined as 1 for this function to be available. See the configuration section for more information.

Obtain the state of any task. States are encoded by the eTaskState enumerated type.

Parameters
xTaskHandle of the task to be queried.
Returns
The state of xTask at the time the function was called. Note the state of the task might change between the function being called, and the functions return value being tested by the calling task.
signed char* pcTaskGetTaskName ( xTaskHandle  xTaskToQuery)
unsigned portBASE_TYPE uxTaskGetNumberOfTasks (