#include <Lock.h>
Public Member Functions | |
Lock () | |
virtual | ~Lock () |
void | lock () const |
uint32_t | unlock () const |
uint32_t | LockCount () const |
Inspect the current count of references. More... | |
Private Attributes | |
uint32_t | count_ |
number of references currently being tracked More... | |
Detailed Description
This class provides a tracking counter and presents lock(), unlock() and LockCount() accessors.
All locks must be cleared with unlock() before this object is destroyed.
Accessors provided by this interface are not private, to allow class hierarchies.
Build with -DLOCKCOUNT_DEBUG flag to enable lock debugging. It is disabled by default due to the cost of debug output.
Constructor & Destructor Documentation
◆ Lock()
◆ ~Lock()
|
inlinevirtual |
Member Function Documentation
◆ lock()
|
inline |
Register one lock / reference against this object. All locks must be cleared before it may be destroyed.
Definition at line 34 of file Lock.h.
References assert, count_, debugs, and UINT32_MAX.
Referenced by DiskdIOStrategy::send().
◆ LockCount()
◆ unlock()
|
inline |
Member Data Documentation
◆ count_
|
mutableprivate |
The documentation for this class was generated from the following file:
- src/base/Lock.h