NCBI C++ ToolKit
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
ncbimtx.hpp File Reference

Multi-threading – mutexes; rw-locks; semaphore. More...

#include <corelib/ncbithr_conf.hpp>
#include <corelib/guard.hpp>
#include <corelib/ncbiobj.hpp>
#include <corelib/ncbitime.hpp>
#include <memory>
#include <deque>
#include <corelib/ncbimtx.inl>
+ Include dependency graph for ncbimtx.hpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CThreadSystemID
 CThreadSystemID –. More...
 
class  CMutexException
 CMutexException –. More...
 
struct  ncbi_namespace_mutex_mt::SSystemFastMutex
 
struct  ncbi_namespace_mutex_mt::SSystemMutex
 
class  CFastMutex
 CFastMutex –. More...
 
class  CMutex
 CMutex –. More...
 
class  CSpinLock
 CSpinLock –. More...
 
struct  SSimpleReadLock< Class >
 SSimpleReadLock –. More...
 
struct  SSimpleWriteLock< Class >
 SSimpleWriteLock –. More...
 
class  CRWLock
 CRWLock –. More...
 
struct  SSimpleReadUnlock< Class >
 SSimpleReadUnlock –. More...
 
struct  SSimpleWriteUnlock< Class >
 SSimpleWriteUnlock –. More...
 
class  CFastRWLock
 CFastRWLock –. More...
 
class  IRWLockHolder_Listener
 Interface for receiving messages about state changes in CRWLockHolder. More...
 
class  IRWLockHolder_Factory
 Interface for factory creating CRWLockHolder objects. More...
 
class  CRWLockHolder
 Holder of the lock inside CYieldingRWLock. More...
 
class  CYieldingRWLock
 Read/write lock without blocking calls. More...
 
class  CSemaphore
 CSemaphore –. More...
 
class  CConditionVariable
 
class  CConditionVariableException
 CConditionVariableException –. More...
 

Namespaces

 ncbi_namespace_mutex_mt
 SSystemFastMutex –.
 

Macros

#define INTERNAL_MUTEX_DEBUG
 Mutex debug setting. More...
 
#define SYSTEM_MUTEX_INITIALIZER   PTHREAD_MUTEX_INITIALIZER
 
#define NCBI_NAMESPACE_MUTEX   ncbi_namespace_mutex_mt
 
#define THREAD_SYSTEM_ID_INITIALIZER   0
 Use in defining initial value of system mutex. More...
 
#define STATIC_FAST_MUTEX_INITIALIZER    { SYSTEM_MUTEX_INITIALIZER, NCBI_NS_NCBI::SSystemFastMutex::eMutexInitialized }
 Determine type of system mutex initialization. More...
 
#define DEFINE_STATIC_FAST_MUTEX(id)   static NCBI_NS_NCBI::SSystemFastMutex id = STATIC_FAST_MUTEX_INITIALIZER
 Define static fast mutex and initialize it. More...
 
#define DECLARE_CLASS_STATIC_FAST_MUTEX(id)   static NCBI_NS_NCBI::SSystemFastMutex id
 Declare static fast mutex. More...
 
#define DEFINE_CLASS_STATIC_FAST_MUTEX(id)   NCBI_NS_NCBI::SSystemFastMutex id = STATIC_FAST_MUTEX_INITIALIZER
 Define fast mutex and initialize it. More...
 
#define STATIC_MUTEX_INITIALIZER    { STATIC_FAST_MUTEX_INITIALIZER, THREAD_SYSTEM_ID_INITIALIZER, 0 }
 Define static mutex initializer. More...
 
#define DEFINE_STATIC_MUTEX(id)   static NCBI_NS_NCBI::SSystemMutex id = STATIC_MUTEX_INITIALIZER
 Define static mutex and initialize it. More...
 
#define DECLARE_CLASS_STATIC_MUTEX(id)   static NCBI_NS_NCBI::SSystemMutex id
 Declare static mutex. More...
 
#define DEFINE_CLASS_STATIC_MUTEX(id)   NCBI_NS_NCBI::SSystemMutex id = STATIC_MUTEX_INITIALIZER
 Define mutex and initialize it. More...
 
#define NCBI_HAVE_CONDITIONAL_VARIABLE
 CConditionVariable –. More...
 

Typedefs

typedef pthread_mutex_t TSystemMutex
 Define a platform independent system mutex. More...
 
typedef CGuard< SSystemFastMutex > TFastMutexGuard
 typedefs for ease of use More...
 
typedef TFastMutexGuard CFastMutexGuard
 ...and backward compatibility More...
 
typedef CGuard< SSystemMutex > TMutexGuard
 typedefs for ease of use More...
 
typedef TMutexGuard CMutexGuard
 ...and backward compatibility More...
 
typedef CNoLock CNoMutex
 CNoMutex –. More...
 
typedef CGuard< CSpinLockCSpinGuard
 
typedef CGuard< CRWLock, SSimpleReadLock< CRWLock > > TReadLockGuard
 
typedef TReadLockGuard CReadLockGuard
 
typedef CGuard< CRWLock, SSimpleWriteLock< CRWLock > > TWriteLockGuard
 
typedef TWriteLockGuard CWriteLockGuard
 
typedef CGuard< CFastRWLock, SSimpleReadLock< CFastRWLock >, SSimpleReadUnlock< CFastRWLock > > CFastReadGuard
 
typedef CGuard< CFastRWLock, SSimpleWriteLock< CFastRWLock >, SSimpleWriteUnlock< CFastRWLock > > CFastWriteGuard
 
typedef CIRef< IRWLockHolder_ListenerTRWLockHolder_ListenerRef
 Types of smart references to IRWLockHolder_Listener. More...
 
typedef CWeakIRef< IRWLockHolder_ListenerTRWLockHolder_ListenerWeakRef
 
typedef CRef< CRWLockHolderTRWLockHolderRef
 Type that should be always used to store pointers to CRWLockHolder. More...
 

Enumerations

enum  ERWLockType { eReadLock = 0 , eWriteLock = 1 }
 Type of locking provided by CYieldingRWLock. More...
 

Functions

static TThreadSystemID GetCurrentThreadSystemID (void)
 Get the current thread ID. More...
 

Detailed Description

Multi-threading – mutexes; rw-locks; semaphore.

MUTEX:

MUTEX CLASSES:

RW-LOCK:

CONDITION VARIABLE:

SEMAPHORE:

Definition in file ncbimtx.hpp.

Modified on Mon Apr 22 03:59:53 2024 by modify_doxy.py rev. 669887