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 test ()
 Test if the lock is set.


Detailed Description

A lock (mutex) primitive.

Definition at line 31 of file lock.h.


Constructor & Destructor Documentation

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

Construct a new lock.

Definition at line 43 of file lock.cpp.

References EQERROR, and EQVERB.

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

Destruct the lock.

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.

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

Definition at line 90 of file lock.cpp.

Referenced by test().

Here is the caller graph for this function:

bool eq::base::Lock::test (  ) 

Test if the lock is set.

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

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 Mon Aug 10 18:58:44 2009 for Equalizer 0.9 by  doxygen 1.5.8