Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

LOW_link::commLock Class Reference

Locking class to ensure exclusive access to a link. More...

#include <LOW_link.h>

Inheritance diagram for LOW_link::commLock:

Inheritance graph
[legend]
Collaboration diagram for LOW_link::commLock:

Collaboration graph
[legend]
List of all members.

Public Methods

 commLock (LOW_link &inLink)
 Obtain the lock. More...

 ~commLock ()
 Release the lock. More...


Private Attributes

LOW_linklink
 Reference to the link the lock is for. More...


Detailed Description

Locking class to ensure exclusive access to a link.

The class is intended to be used in a "locking is creation" design pattern. On creation an exclusive lock is optained for the device, and on destruction the lock is released.

Definition at line 69 of file LOW_link.h.


Constructor & Destructor Documentation

LOW_link::commLock::commLock LOW_link   inLink
 

Obtain the lock.

Parameters:
inLink  Reference to the link the lock is for.

Definition at line 61 of file LOW_link.cpp.

References LOW_link::aquireCount, LOW_link::aquirePID, LOW_semaphoreSet::decSem(), LOW_platformMisc::getThreadID(), LOW_semaphoreSet::incSem(), link, LOW_helper_msglog::linkLock_dl, LOW_helper_msglog::printDebug(), and LOW_link::semSet.

LOW_link::commLock::~commLock  
 

Release the lock.

Exceptions:
internal_error  Thrown on illegal lock state (should not happen).

Definition at line 83 of file LOW_link.cpp.

References LOW_link::aquireCount, LOW_link::aquirePID, LOW_semaphoreSet::decSem(), LOW_platformMisc::getThreadID(), LOW_semaphoreSet::incSem(), link, LOW_helper_msglog::linkLock_dl, LOW_helper_msglog::printDebug(), and LOW_link::semSet.


Member Data Documentation

LOW_link& LOW_link::commLock::link [private]
 

Reference to the link the lock is for.

Definition at line 83 of file LOW_link.h.

Referenced by commLock(), and ~commLock().


The documentation for this class was generated from the following files:
Generated on Sun Jan 12 21:07:56 2003 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001