CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Lockable Class Reference

#include <util_concurrency.h>

Inheritance diagram for Lockable:
Collaboration diagram for Lockable:

Public Member Functions

virtual ~Lockable ()
 
void Lock () const
 
int TryLock () const
 
void Unlock () const
 

Protected Member Functions

 Lockable ()
 

Private Attributes

pthread_mutex_t mutex_
 

Additional Inherited Members

- Private Member Functions inherited from SingleCopy
 SingleCopy ()
 

Detailed Description

This file is part of the CernVM File System. Implements a simple interface to lock objects of derived classes. Classes that inherit from Lockable are also usable with the LockGuard template for scoped locking semantics.

Definition at line 28 of file util_concurrency.h.

Constructor & Destructor Documentation

virtual Lockable::~Lockable ( )
inlinevirtual

Definition at line 30 of file util_concurrency.h.

Lockable::Lockable ( )
inlineprotected

Definition at line 37 of file util_concurrency.h.

Here is the call graph for this function:

Member Function Documentation

void Lockable::Lock ( ) const
inline

Definition at line 32 of file util_concurrency.h.

int Lockable::TryLock ( ) const
inline

Definition at line 33 of file util_concurrency.h.

void Lockable::Unlock ( ) const
inline

Definition at line 34 of file util_concurrency.h.

Member Data Documentation

pthread_mutex_t Lockable::mutex_
mutableprivate

Definition at line 43 of file util_concurrency.h.


The documentation for this class was generated from the following file: