Equalizer 1.0

co::base::Lock Class Reference

A lock (mutex) primitive. More...

#include <lock.h>

Inheritance diagram for co::base::Lock:
Collaboration diagram for co::base::Lock:

List of all members.

Public Member Functions

COBASE_API Lock ()
 Construct a new lock.
COBASE_API ~Lock ()
 Destruct the lock.
COBASE_API void set ()
 Acquire the lock.
COBASE_API void unset ()
 Release the lock.
COBASE_API bool trySet ()
 Attempt to acquire the lock.
COBASE_API 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

COBASE_API co::base::Lock::Lock ( )

Construct a new lock.

Version:
1.0
COBASE_API co::base::Lock::~Lock ( )

Destruct the lock.

Version:
1.0

Member Function Documentation

COBASE_API bool co::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
COBASE_API void co::base::Lock::set ( )

Acquire the lock.

Version:
1.0

Referenced by co::Connection::lockSend().

Here is the caller graph for this function:

COBASE_API bool co::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
COBASE_API void co::base::Lock::unset ( )

Release the lock.

Version:
1.0

Referenced by co::Connection::unlockSend().

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:09 for Equalizer 1.0 by  doxygen 1.7.3