#include <RIPCMutex.h>
Inheritance diagram for RIPCMutex:
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 Methods | |
void | lock () |
bool | lock (unsigned timeout) |
virtual void | priorityLock (int rank)=0 |
virtual bool | priorityLock (int rank, unsigned timeout)=0 |
virtual void | unlock ()=0 |
RIPCPrimitiveType | getType () |
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 Methods | |
void | deallocator (RIPCObject const &objDesc) |
N
times, it should unlock it N
time to release the mutex. Server is able to detect deadlock for mutexes.
Semantic of methods inherited from RIPCPrimitive
:
waitFor
reset
reset
method be owner of the mutex
|
Primitive types |
|
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. |
|
Primitive returned by
|
|
Close primitive. This method decrease access counter of the primitive and once it becomes zero, primitive is destroyed. |
|
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. |
|
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.
|
|
Get RIPC primitive type
Implements RIPCPrimitive. |
|
Get RIPC primitive type name
|
|
Try to lock the mutex with specified timeout. If lock can not be granted within specified time, request is failed.
|
|
Lock mutex. Only one session can lock mutex each moment of time. |
|
Try to lock the mutex with specified timeout. If lock can not be granted within specified time, request is failed.
|
|
Lock mutex. Only one session can lock mutex each moment of time.
|
|
Priority wait until state of primitive is switched with timeout. Requests with the lowest
|
|
Priority wait until state of primitive is switched. Requests with the lowest
|
|
Reset primitive. Semantic of this method depends on particular primitive type and is explained in specification of each primitive. |
|
Unlock mutex. This method release the mutex if number of unlocks is equal to number of locks |
|
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.
|
|
Wait until state of primitive is switched. Semantic of this method depends on particular primitive type and is explained in specification of each primitive. |