event.h File Reference

This file contains the interfaces for the OSEK/VDX compatible event handling. More...

#include "typedefs.h"
#include "errno.h"

Go to the source code of this file.

Defines

#define DeclareEvent(x)

Typedefs

typedef unsigned EventMaskType
 The EventMaskType represents events, for each one bit.
typedef EventMaskTypeEventMaskRefType

Functions

StatusType SetEvent (TaskType TaskID, EventMaskType Mask)
 The service may be called from an interrupt service routine and from the task level, but not from hook routines.
StatusType ClearEvent (EventMaskType Mask)
 This service returns the current state of all event bits of the task <TaskID>, not the events that the task is waiting for.
StatusType GetEvent (TaskType TaskID, EventMaskRefType Event)
 This service returns the current state of all event bits of the task TaskID, not the events that the task is waiting for.
StatusType WaitEvent (EventMaskType Mask)
 The state of the calling task is set to waiting, unless at least one of the events specified in <Mask> has already been set.


Detailed Description

This file contains the interfaces for the OSEK/VDX compatible event handling.

Definition in file event.h.


Function Documentation

StatusType ClearEvent EventMaskType  Mask  ) 
 

This service returns the current state of all event bits of the task <TaskID>, not the events that the task is waiting for.

The service may be called from interrupt service routines, task level and some hook routines (see Figure 12-1). The current status of the event mask of task <TaskID> is copied to <Event>.

Parameters:
Mask Mask of the events to be cleared.

StatusType GetEvent TaskType  TaskID,
EventMaskRefType  Event
 

This service returns the current state of all event bits of the task TaskID, not the events that the task is waiting for.

The service may be called from interrupt service routines, task level and some hook routines (see Figure 12-1). The current status of the event mask of task <TaskID> is copied to Event.

Parameters:
TaskID Task whose event mask is to be returned.
Event reference to the place wehre the event will be stored.

StatusType SetEvent TaskType  TaskID,
EventMaskType  Mask
 

The service may be called from an interrupt service routine and from the task level, but not from hook routines.

The events of task <TaskID> are set according to the event mask <Mask>. Calling SetEvent causes the task <TaskID> to be transferred to the ready state, if it was waiting for at least one of the events specified in Mask.

Parameters:
TaskID Reference to the task for which one or several events are to be set. Please the, if NULL_TASK_ID is given the method returns E_OK and does nothing.
Mask Mask of the events to be set.

StatusType WaitEvent EventMaskType  Mask  ) 
 

The state of the calling task is set to waiting, unless at least one of the events specified in <Mask> has already been set.

This call enforces rescheduling, if the wait condition occurs. If rescheduling takes place, the internal resource of the task is released while the task is in the waiting state. This service shall only be called from the extended task owning the event.

Parameters:
Mask Mask of the events waited for.


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