Main Page | Class Hierarchy | Class List | File List | Class Members

RIPCBarrier Class Reference

#include <RIPCBarrier.h>

Inheritance diagram for RIPCBarrier:

RIPCPrimitive List of all members.

Public Types

enum  RIPCPrimitiveType {
  RIPC_MUTEX, RIPC_EVENT, RIPC_SEMAPHORE, RIPC_BARRIER,
  RIPC_LOCK, RIPC_SHARED_MEMORY, RIPC_QUEUE
}
enum  RIPCRanks { DEFAULT_RANK = 0 }

Public Member Functions

char const * getTypeName ()
virtual char const * getName ()=0
virtual bool alreadyExists ()=0
void waitFor ()
bool waitFor (unsigned timeout)
virtual void priorityWait (int rank)=0
virtual bool priorityWait (int rank, unsigned timeout)=0
virtual void reset ()=0
virtual void close ()=0
virtual void * allocate (size_t size)
virtual void deallocate (void *obj, size_t size=0)

Static Public Member Functions

void deallocator (RIPCObject const &objDesc)

Detailed Description

Barrier sycnhronization object. This synchronization primitive is used to enhure that all processes reach the same step. Session will be blocked on barrier until all other sessions will also excute waitFor method for this barrier (and also be blocked). Then, once all sessions, are blocked, all of them are released.

Semantic of methods inherited from RIPCPrimitive:

waitFor
Wait until specified number of other sessions will reach this barrier (be blocked on this barrier)
reset
Wakeup all blocked sessions


Member Enumeration Documentation

enum RIPCPrimitive::RIPCPrimitiveType [inherited]
 

Primitive types


Member Function Documentation

virtual void* RIPCPrimitive::allocate size_t  size  )  [virtual, inherited]
 

Method for allocation memory for container elements (currently queue and shared memory). This method can be overriden by derived class* to provide custom allocation policy.

virtual bool RIPCPrimitive::alreadyExists  )  [pure virtual, inherited]
 

Primitive returned by createXXX method already exists This method should be call immediatly after createXXX to check if new primitive was created or existed one was returned.

Returns:
true if createXXX method doesn't create new primitive

virtual void RIPCPrimitive::close  )  [pure virtual, inherited]
 

Close primitive. This method decrease access counter of the primitive and once it becomes zero, primitive is destroyed.

virtual void RIPCPrimitive::deallocate void *  obj,
size_t  size = 0
[virtual, inherited]
 

Method for deallocation memory for container elements (currently queue and shared memory). This method can be overriden by derived class to provide custom allocation policy.

virtual char const* RIPCPrimitive::getName  )  [pure virtual, inherited]
 

Get primitive name. Name of the primitive is unique with primitives of the same type (events, semaphores,...). It is possible that, for example, event and mutex has the same name.

Returns:
primitive name

char const* RIPCPrimitive::getTypeName  )  [inherited]
 

Get RIPC primitive type name

Returns:
name of primitive type

virtual bool RIPCPrimitive::priorityWait int  rank,
unsigned  timeout
[pure virtual, inherited]
 

Priority wait until state of primitive is switched with timeout. Requests with the lowest rank value will be satisfied first. Semantic of this method depends on particular primitive type and is explained in specification of each primitive.

Parameters:
rank processes will be placed in wait queue in the order of increasing rank value and in the same order will be taken from the queue.
timeout operation timeout in millisoconds
Returns:
false if timeout is expired before primitive state is changed

virtual void RIPCPrimitive::priorityWait int  rank  )  [pure virtual, inherited]
 

Priority wait until state of primitive is switched. Requests with the lowest rank value will be satisfied first. Semantic of this method depends on particular primitive type and is explained in specification of each primitive.

Parameters:
rank processes will be placed in wait queue in the order of increasing rank value and in the same order will be taken from the queue.

virtual void RIPCPrimitive::reset  )  [pure virtual, inherited]
 

Reset primitive. Semantic of this method depends on particular primitive type and is explained in specification of each primitive.

bool RIPCPrimitive::waitFor unsigned  timeout  )  [inline, inherited]
 

Wait until state of primitive is switched with timeout. Semantic of this method depends on particular primitive type and is explained in specification of each primitive.

Returns:
false if timeout is expired before primitive state is changed

void RIPCPrimitive::waitFor  )  [inline, inherited]
 

Wait until state of primitive is switched. Semantic of this method depends on particular primitive type and is explained in specification of each primitive.


The documentation for this class was generated from the following file:
Generated on Wed Nov 26 14:58:18 2003 for RIPC by doxygen 1.3.5