resource.h File Reference

OSEK/VDX Handle Resources This file contains the code to handle resources according to the OSEK/VDX standard Section 13.4. More...

#include "proc.h"

Go to the source code of this file.

Classes

struct  ResourceInstance

Defines

#define NO_OWNER   0xff
 this is the default value of the resource lock
#define InitResource(x)   {(x).owner = NO_OWNER; }
#define DeclareResource(x)   extern ResourceInstance x
#define ResourceOwner(x)   (x).owner

Typedefs

typedef __near ResourceInstanceResourceType

Functions

StatusType GetResource (ResourceType ResID)
 GetResource get a critical section This call serves to enter critical sections in the code that are assigned to the resource referenced by <ResID>.
StatusType ReleaseResource (ResourceType ResID)
 ReleaseResource is the counterpart of GetResource and serves to leave critical sections in the code that are assigned to the resource referenced by <ResID>.


Detailed Description

OSEK/VDX Handle Resources This file contains the code to handle resources according to the OSEK/VDX standard Section 13.4.

Definition in file resource.h.


Function Documentation

StatusType GetResource ResourceType  ResID  ) 
 

GetResource get a critical section This call serves to enter critical sections in the code that are assigned to the resource referenced by <ResID>.

A critical section shall always be left using ReleaseResource.

Parameters:
ResID - Reference to resource

StatusType ReleaseResource ResourceType  ResID  ) 
 

ReleaseResource is the counterpart of GetResource and serves to leave critical sections in the code that are assigned to the resource referenced by <ResID>.

Parameters:
ResID - Reference to the resource,


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