task.h File Reference

OSDEK/VDX Task interface. More...

#include "typedefs.h"
#include "proc.h"

Go to the source code of this file.

Defines

#define DeclareTask(s)
 DeclareTask serves as an external declaration of a task.
#define TASK(x)   void x(TASK_ARGUMENT arg)
 OSEK/VDX Naming convention for tasks.

Functions

StatusType ActivateTask (TaskType id)
 The task <TaskID> is transferred from the suspended state into the ready state14.
StatusType TerminateTask (void)
 This service causes the termination of the calling task.
StatusType ChainTask (TaskType id)
 This service causes the termination of the calling task.
StatusType GetTaskID (TaskRefType task)
 GetTaskID returns the information about the TaskID of the task which is currently running.
StatusType GetTaskState (TaskType id, TaskStateRefType state)
 Returns the state of a task (running, ready, waiting, suspended) at the time of calling GetTaskState.


Detailed Description

OSDEK/VDX Task interface.

Definition in file task.h.


Define Documentation

#define DeclareTask  ) 
 

DeclareTask serves as an external declaration of a task.

The function and use of this service are similar to that of the external declaration of variables.

Definition at line 39 of file task.h.


Function Documentation

StatusType ActivateTask TaskType  id  ) 
 

The task <TaskID> is transferred from the suspended state into the ready state14.

The operating system ensures that the task code is being executed from the first statement. The service may be called from interrupt level and from task level. Rescheduling after the call to ActivateTask depends on the place it is called from (ISR, non preemptable task, preemptable task). If E_OS_LIMIT is returned the activation is ignored. When an extended task is transferred from suspended state into ready state all its events are cleared.

StatusType ChainTask TaskType  id  ) 
 

This service causes the termination of the calling task.

After termination of the calling task a succeeding task <TaskID> is activated. Using this service, it ensures that the succeeding task starts to run at the earliest after the calling task has been terminated.

StatusType TerminateTask void   ) 
 

This service causes the termination of the calling task.

The calling task is transferred from the running state into the suspended state.


Generated on Mon Sep 29 19:56:48 2008 for mKernel by  doxygen 1.4.6