|
Squid Web Cache master
|
#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. | |
Private Attributes | |
| uint32_t | count_ |
| number of references currently being tracked | |
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.
|
inlinevirtual |
|
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().
|
inline |
|
mutableprivate |