CernVM-FS
2.12.0
|
#include <fence.h>
Public Member Functions | |
Fence () | |
void | Enter () |
void | Leave () |
void | Close () |
void | Drain () |
void | Open () |
Private Member Functions | |
FRIEND_TEST (T_Fence, Basics) | |
Private Attributes | |
atomic_int64 | counter_ |
atomic_int32 | blocking_ |
Static Private Attributes | |
static const unsigned | kBusyWaitBackoffMs = 100 |
Additional Inherited Members | |
Protected Member Functions inherited from SingleCopy | |
SingleCopy () | |
This file is part of the CernVM File System. A Fence can be used to protect critical regions where blocking is a very rare operation. When the Fence is not blocked, entering and leaving a critical region requires only a 1-2 atomic operations. In order to block the fence, no new threads can enter a critical region. When all entered regions are left, the fence is blocked. Waiting is done through slow busy wait.
|
inline |
Definition at line 45 of file fence.h.
Referenced by loader::Reload().
|
inline |
Close and let live critical regions exit
Definition at line 52 of file fence.h.
Referenced by loader::Reload(), and FuseRemounter::TryFinish().
|
inline |
Definition at line 34 of file fence.h.
Referenced by cvmfs::cvmfs_getattr(), cvmfs::cvmfs_getxattr(), cvmfs::cvmfs_listxattr(), cvmfs::cvmfs_lookup(), cvmfs::cvmfs_open(), cvmfs::cvmfs_opendir(), cvmfs::cvmfs_readlink(), cvmfs::cvmfs_statfs(), cvmfs::Evict(), and cvmfs::Pin().
|
private |
|
inline |
Definition at line 41 of file fence.h.
Referenced by cvmfs::cvmfs_getattr(), cvmfs::cvmfs_getxattr(), cvmfs::cvmfs_listxattr(), cvmfs::cvmfs_lookup(), cvmfs::cvmfs_open(), cvmfs::cvmfs_opendir(), cvmfs::cvmfs_readlink(), cvmfs::cvmfs_statfs(), cvmfs::Evict(), and cvmfs::Pin().
|
inline |
Definition at line 59 of file fence.h.
Referenced by loader::Reload(), and FuseRemounter::TryFinish().
|
private |
|
private |