eq::base::Lock Class Reference

A lock (mutex) primitive. More...

#include <lock.h>

Inheritance diagram for eq::base::Lock:
Inheritance graph
[legend]
Collaboration diagram for eq::base::Lock:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Lock ()
 Construct a new lock.
 ~Lock ()
 Destruct the lock.
void set ()
 Acquire the lock.
void unset ()
 Release the lock.
bool trySet ()
 Attempt to acquire the lock.
bool isSet ()
 Test if the lock is set.

Detailed Description

A lock (mutex) primitive.

See also:
ScopedMutex

Definition at line 34 of file lock.h.


Constructor & Destructor Documentation

eq::base::Lock::Lock (  ) 

Construct a new lock.

Version:
1.0

Definition at line 43 of file lock.cpp.

References EQERROR, and EQVERB.

eq::base::Lock::~Lock (  ) 

Destruct the lock.

Version:
1.0

Definition at line 59 of file lock.cpp.


Member Function Documentation

void eq::base::Lock::set (  ) 
void eq::base::Lock::unset (  ) 
bool eq::base::Lock::trySet (  ) 

Attempt to acquire the lock.

This method implements an atomic test-and-set operation.

Returns:
true if the lock was set, false if it was not set.
Version:
1.0

Definition at line 90 of file lock.cpp.

Referenced by isSet().

Here is the caller graph for this function:

bool eq::base::Lock::isSet (  ) 

Test if the lock is set.

Returns:
true if the lock is set, false if it is not set.
Version:
1.0

Definition at line 100 of file lock.cpp.

References trySet(), and unset().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sat Feb 6 13:08:02 2010 for Equalizer 0.9.1 by  doxygen 1.6.1