CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NfsMapsLeveldb::ForkAwareEnv Class Reference
Inheritance diagram for NfsMapsLeveldb::ForkAwareEnv:
Collaboration diagram for NfsMapsLeveldb::ForkAwareEnv:

Public Member Functions

 ForkAwareEnv (NfsMapsLeveldb *maps)
 
void StartThread (void(*f)(void *), void *a)
 
void Schedule (void(*function)(void *), void *arg)
 
void WaitForBGThreads ()
 
void SleepForMicroseconds (int micros)
 

Static Private Member Functions

static void * MainFakeThread (void *data)
 

Private Attributes

NfsMapsLeveldbmaps_
 
atomic_int32 num_bg_threads_
 

Detailed Description

Leveldb's background threads must not be started before cvmfs has forked. Before forking, we run the processes in specially created threads. We make sure, these threads are terminated before forking.

Definition at line 58 of file nfs_maps_leveldb.h.

Constructor & Destructor Documentation

NfsMapsLeveldb::ForkAwareEnv::ForkAwareEnv ( NfsMapsLeveldb maps)
explicit

Definition at line 38 of file nfs_maps_leveldb.cc.

Member Function Documentation

void * NfsMapsLeveldb::ForkAwareEnv::MainFakeThread ( void *  data)
staticprivate

Definition at line 92 of file nfs_maps_leveldb.cc.

void NfsMapsLeveldb::ForkAwareEnv::Schedule ( void(*)(void *)  function,
void *  arg 
)

Definition at line 57 of file nfs_maps_leveldb.cc.

Here is the call graph for this function:

void NfsMapsLeveldb::ForkAwareEnv::SleepForMicroseconds ( int  micros)

Leveldb's usleep might collide with the ALARM timer

Definition at line 87 of file nfs_maps_leveldb.cc.

Here is the call graph for this function:

void NfsMapsLeveldb::ForkAwareEnv::StartThread ( void(*)(void *)  f,
void *  a 
)

Definition at line 46 of file nfs_maps_leveldb.cc.

void NfsMapsLeveldb::ForkAwareEnv::WaitForBGThreads ( )

Definition at line 78 of file nfs_maps_leveldb.cc.

Referenced by NfsMapsLeveldb::Create().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

NfsMapsLeveldb* NfsMapsLeveldb::ForkAwareEnv::maps_
private

Definition at line 69 of file nfs_maps_leveldb.h.

atomic_int32 NfsMapsLeveldb::ForkAwareEnv::num_bg_threads_
private

Definition at line 70 of file nfs_maps_leveldb.h.

Referenced by ForkAwareEnv(), and MainFakeThread().


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