CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
anonymous_namespace{cache_posix.cc}::CallGuard Class Reference

Public Member Functions

 CallGuard ()
 
 ~CallGuard ()
 

Static Public Member Functions

static void Drainout ()
 

Private Attributes

bool drainout_
 

Static Private Attributes

static atomic_int32 global_drainout_ = 0
 
static atomic_int32 num_inflight_calls_ = 0
 

Detailed Description

A CallGuard object can be placed at the beginning of a function. It counts the number of so-annotated functions that are in flight. The Drainout() call will wait until all functions that have been called so far are finished.

The class is used in order to wait for remaining calls when switching into the read-only cache mode.

Definition at line 79 of file cache_posix.cc.

Constructor & Destructor Documentation

anonymous_namespace{cache_posix.cc}::CallGuard::CallGuard ( )
inline

Definition at line 81 of file cache_posix.cc.

anonymous_namespace{cache_posix.cc}::CallGuard::~CallGuard ( )
inline

Definition at line 87 of file cache_posix.cc.

Member Function Documentation

static void anonymous_namespace{cache_posix.cc}::CallGuard::Drainout ( )
inlinestatic

Definition at line 91 of file cache_posix.cc.

Here is the call graph for this function:

Member Data Documentation

bool anonymous_namespace{cache_posix.cc}::CallGuard::drainout_
private

Definition at line 97 of file cache_posix.cc.

atomic_int32 anonymous_namespace{cache_posix.cc}::CallGuard::global_drainout_ = 0
staticprivate

Definition at line 98 of file cache_posix.cc.

atomic_int32 anonymous_namespace{cache_posix.cc}::CallGuard::num_inflight_calls_ = 0
staticprivate

Definition at line 99 of file cache_posix.cc.


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