Declare static fast mutex.
Definition at line 500 of file ncbimtx.hpp.
◆ DECLARE_CLASS_STATIC_MUTEX #define DECLARE_CLASS_STATIC_MUTEX ( id ) static NCBI_NS_NCBI::SSystemMutex id ◆ DECLARE_TLS_VAR ◆ DEFINE_CLASS_STATIC_FAST_MUTEXDefine fast mutex and initialize it.
Definition at line 504 of file ncbimtx.hpp.
◆ DEFINE_CLASS_STATIC_MUTEXDefine mutex and initialize it.
Definition at line 520 of file ncbimtx.hpp.
◆ DEFINE_STATIC_FAST_MUTEXDefine static fast mutex and initialize it.
Definition at line 496 of file ncbimtx.hpp.
◆ DEFINE_STATIC_MUTEXDefine static mutex and initialize it.
Definition at line 512 of file ncbimtx.hpp.
◆ INTERNAL_MUTEX_DEBUG #define INTERNAL_MUTEX_DEBUG ◆ NCBI_ATOMIC_TYPE ◆ NCBI_COUNTER_ADD ◆ NCBI_COUNTER_ASM_OK ◆ NCBI_COUNTER_UNSIGNED ◆ NCBI_COUNTER_USE_STD_ATOMIC ◆ NCBI_HAVE_CONDITIONAL_VARIABLE #define NCBI_HAVE_CONDITIONAL_VARIABLE ◆ NCBI_NAMESPACE_MUTEX #define NCBI_NAMESPACE_MUTEX ncbi_namespace_mutex_mtDefinition at line 147 of file ncbimtx.hpp.
◆ NCBI_SCHED_SPIN_INIT ◆ NCBI_SCHED_SPIN_YIELD #define NCBI_SCHED_SPIN_YIELD ( ) if ( !(++spin_counter & 3) ) ::SwitchToThread()Definition at line 58 of file ncbi_atomic_defs.h.
◆ NCBI_SCHED_YIELD ◆ NCBI_STATIC_TLS_VIA_SAFE_STATIC_REF #define NCBI_STATIC_TLS_VIA_SAFE_STATIC_REF 1Definition at line 292 of file ncbithr.hpp.
◆ NCBI_SWAP_POINTERS #define NCBI_SWAP_POINTERS ( loc, nv ) (InterlockedExchangePointer(loc, nv))Definition at line 268 of file ncbi_atomic_defs.h.
◆ STATIC_FAST_MUTEX_INITIALIZERDetermine type of system mutex initialization.
Define static fast mutex initial value.
Definition at line 492 of file ncbimtx.hpp.
◆ STATIC_MUTEX_INITIALIZERDefine static mutex initializer.
Definition at line 508 of file ncbimtx.hpp.
◆ SYSTEM_MUTEX_INITIALIZER #define SYSTEM_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZERDefinition at line 120 of file ncbimtx.hpp.
◆ THREAD_SYSTEM_ID_INITIALIZER #define THREAD_SYSTEM_ID_INITIALIZER 0Use in defining initial value of system mutex.
Definition at line 164 of file ncbimtx.hpp.
◆ CFastMutexGuard...and backward compatibility
Definition at line 391 of file ncbimtx.hpp.
◆ CFastReadGuard ◆ CFastWriteGuard ◆ CMutexGuard...and backward compatibility
Definition at line 485 of file ncbimtx.hpp.
◆ CNoMutexCNoMutex –.
Fake mutex that does not lock anything.
Allows to create template classes which use CMutex/CFastMutex/CNoMutex as an argument. In case of CNoMutex no real locking is performed.
Definition at line 824 of file ncbimtx.hpp.
◆ CReadLockGuard ◆ CSpinGuard ◆ CWriteLockGuard ◆ FCleanup [1/2]template<class TValue >
typedef void(* CTls< TValue >::FCleanup) (TValue *value, void *cleanup_data)Define cleanup function type, FCleanup.
Definition at line 185 of file ncbithr.hpp.
◆ FCleanup [2/2]Define cleanup function type, FCleanup.
Definition at line 327 of file ncbithr.hpp.
◆ FCleanupBase typedef void(* CTlsBase::FCleanupBase) (void *value, void *cleanup_data)Definition at line 72 of file ncbithr.hpp.
◆ FUserCleanup [1/2] ◆ FUserCleanup [2/2]template<class TValue >
typedef void(* CStaticTls< TValue >::FUserCleanup) (void *ptr)User cleanup function type.
Definition at line 325 of file ncbithr.hpp.
◆ key_type ◆ TBitVector ◆ TFastMutexGuard ◆ TFlags ◆ THoldersList ◆ TID [1/2]Define a simpler alias for TThreadSystemID.
Definition at line 180 of file ncbimtx.hpp.
◆ TID [2/2]Get ID of current thread.
When not using native threads, but CThread only, the main thread is guaranteed to have zero id. With native threads the main thread may have a non-zero id and it's more reliable to use IsMain().
Definition at line 598 of file ncbithr.hpp.
◆ TLifeSpan ◆ TListenersList ◆ TLockVector ◆ TMutexGuard ◆ TNCBIAtomicValueDefine platform specific atomic-operations macros/values.
TNCBIAtomicValue "type" is defined based on facilities available for a compiler/platform. TNCBIAtomicValue is used in the CAtomicCounter class for defining the internal represntation of the counter.
Where possible NCBI_COUNTER_ADD is defined in terms of compiler/platform specific features, favoring inline assembly over standard library calls as function-call overhead can be appreciable, particularly on x86.
Definition at line 139 of file ncbi_atomic_defs.h.
◆ TParent ◆ TReadLockGuard [1/6] ◆ TReadLockGuard [2/6] ◆ TReadLockGuard [3/6] ◆ TReadLockGuard [4/6] ◆ TReadLockGuard [5/6] ◆ TReadLockGuard [6/6] ◆ TRunModeBitwise OR'd flags for thread creation passed to Run().
Definition at line 558 of file ncbithr.hpp.
◆ TRWLockHolder_ListenerRef ◆ TRWLockHolder_ListenerWeakRef ◆ TRWLockHolderRef ◆ TSystemMutexDefine a platform independent system mutex.
Definition at line 119 of file ncbimtx.hpp.
◆ TThreadHandleDefine platform-dependent thread handle type.
Definition at line 92 of file ncbithr_conf.hpp.
◆ TThreadSystemID ◆ TTlsKey ◆ TTlsSet ◆ TWrapperArg ◆ TWrapperRes ◆ TWriteLockGuard [1/6] ◆ TWriteLockGuard [2/6] ◆ TWriteLockGuard [3/6] ◆ TWriteLockGuard [4/6] ◆ TWriteLockGuard [5/6] ◆ TWriteLockGuard [6/6] ◆ value_type ◆ anonymous enum Enumerator kWriteLockValueNumber in lock count showing that write lock is acquired.
Definition at line 1157 of file ncbimtx.hpp.
◆ ECleanupModeFlag telling which code has called TLS cleanup.
Enumerator eCleanup_ToolkitCleanup is performed by CThread.
eCleanup_NativeCleanup is performed by thread_local destructor.
Definition at line 84 of file ncbithr.hpp.
◆ EErrCode [1/3]Error types that a mutex can generate.
Enumerator eLockLock error.
eUnlockUnlock error.
eTryLockAttempted lock error.
eOwnerNot owned error.
eUninitializedUninitialized error.
Definition at line 233 of file ncbimtx.hpp.
◆ EErrCode [2/3]Error types that a condition variable can generate.
Enumerator eInvalidValueParameter of WaitForSignal function is invalid.
Mutex passed to WaitForSignal is not locked exactly once
eMutexLockCountMutex passed to WaitForSignal is not owned by the current thread.
eMutexOwnerDifferent mutexes were supplied for concurrent WaitForSignal operations on this condition variable.
eMutexDifferentCondition variable is not supported on this platform.
eUnsupportedDefinition at line 1528 of file ncbimtx.hpp.
◆ EErrCode [3/3] Enumerator eRunErrorFailed to run thread.
eControlErrorFailed to control thread's state.
eOtherOther thread errors.
Definition at line 695 of file ncbithr.hpp.
◆ EFlagsFlags (passed at construction time) for fine-tuning lock behavior.
Enumerator fFavorWritersForbid further readers from acquiring the lock if any writers are waiting for it, to keep would-be writers from starving.
Definition at line 956 of file ncbimtx.hpp.
◆ EInternalFlags Enumerator fTrackReadersKeep track of which threads have read locks.
Definition at line 1039 of file ncbimtx.hpp.
◆ ELockSemanticsThis is for condition variables.
Enumerator eNormal ePseudoModify object data and call system.
Modify object data, but do not call system
Definition at line 287 of file ncbimtx.hpp.
◆ EMagicInitialization flag values.
Enumerator eMutexUninitializedUninitialized value.
eMutexInitializedMagic initialized value,.
Definition at line 280 of file ncbimtx.hpp.
◆ ENativeThreadCleanupFlag indicating if cleanup function should be called when using native threads rather than CThread.
Native threads may perform cleanup later than CThread, so that some resources (like static variables) may be already destroyed. To prevent failures the default mode is eSkipCleanup.
Enumerator eDoCleanup eSkipCleanupDefinition at line 78 of file ncbithr.hpp.
◆ ERunModeWhich mode should the thread run in.
Enumerator fRunDefaultDefault mode.
fRunDetachedRun the thread detached (non-joinable)
fRunBoundRun thread in a 1:1 thread:LPW mode.
Run thread in a N:1 thread:LPW mode.
Run thread with low priority (MS-Win only)
fRunAllowSTAllow threads to run in single thread builds.
fRunCloneRequestContextClone parent's request context and pass it to the new thread.
The flag can be used when processing the same request in multiple child threads.
Definition at line 539 of file ncbithr.hpp.
◆ ERWLockType ◆ AcquireLock() ◆ AcquireReadLock()Read lock.
Method returns immediately no matter if lock is granted or not. If lock is not granted then request for lock is remembered and will be granted later unless CRWLockHolder::ReleaseLock() is called (or object is deleted).
◆ AcquireWriteLock()Write lock.
Method returns immediately no matter if lock is granted or not. If lock is not granted then request for lock is remembered and will be granted later unless CRWLockHolder::ReleaseLock() is called (or object is deleted).
◆ AddListener()Add object keeping track of holder state changes.
◆ CConditionVariable() CConditionVariable::CConditionVariable ( void ) ◆ CFastMutex() [1/2]Private copy constructor to disallow initialization.
◆ CFastMutex() [2/2] CFastMutex::CFastMutex ( void )Constructor.
Creates mutex handle.
◆ CFastRWLock() [1/2] ◆ CFastRWLock() [2/2] CFastRWLock::CFastRWLock ( void ) ◆ CheckInitialized() void ncbi_namespace_mutex_mt::SSystemFastMutex::CheckInitialized ( void ) constCheck initialized value of mutex.
◆ Cleanup() ◆ CleanupAndDeleteTlsData() ◆ CleanupTlsData() ◆ ClearAll()The function is called before thread termination to cleanup data stored in the TLS.
Definition at line 82 of file ncbithr.cpp.
References set< Key, Compare >::clear(), CSafeStatic< T, Callbacks >::Get(), CTlsBase::m_AutoDestroy, CUsedTlsBases::m_UsedTls, NON_CONST_ITERATE, NULL, CObject::Referenced(), CObject::RemoveReference(), CUsedTlsBases::sm_UsedTlsBases, and CTlsBase::x_DeleteTlsData().
Referenced by s_CleanupMainUsedTlsBases().
◆ ClearAllCurrentThread() ◆ CLockVector() [1/2] ◆ CLockVector() [2/2] ◆ CLockVectorGuard() [1/3]template<class TLockVect >
◆ CLockVectorGuard() [2/3]template<class TLockVect >
Construct and lock.
Definition at line 182 of file lock_vector.hpp.
References _ASSERT, and CLockVectorGuard< TLockVect >::DoLock().
◆ CLockVectorGuard() [3/3]template<class TLockVect >
◆ CMutex() [1/2]Private copy constructor to disallow initialization.
◆ CMutex() [2/2] ◆ Create() ◆ CreateHolder() ◆ CRWLock() [1/2]Private copy constructor to disallow initialization.
◆ CRWLock() [2/2] CRWLock::CRWLock ( TFlags flags =0
) ◆ CRWLockHolder() [1/2] ◆ CRWLockHolder() [2/2]
Create lock holder bound to given object factory.
◆ CSemaphore() [1/2]Private copy constructor to disallow initialization.
◆ CSemaphore() [2/2] CSemaphore::CSemaphore ( unsigned int init_count, unsigned int max_count )Constructor.
Definition at line 1696 of file ncbimtx.cpp.
References SSemaphore::cond, SSemaphore::count, ERR_POST, Error(), CSemaphore::m_Sem, SSemaphore::max_count, min(), SSemaphore::mutex, NULL, SSemaphore::wait_count, xncbi_Validate, and xncbi_ValidatePthread.
◆ CSpinLock() [1/2]Prohibit copying of the object.
◆ CSpinLock() [2/2] CSpinLock::CSpinLock ( void ) ◆ CStaticTls() ◆ CStaticTls_Callbacks() ◆ CThread() [1/2]Prohibit copying and assigning.
◆ CThread() [2/2] CThread::CThread ( void ) ◆ CTls() ◆ CTlsBase() CTlsBase::CTlsBase ( bool auto_destroy ) inlineprotected ◆ CUsedTlsBases() [1/2] ◆ CUsedTlsBases() [2/2] CUsedTlsBases::CUsedTlsBases ( void ) ◆ CYieldingRWLock() ◆ DefaultCleanup()template<class TValue >
static void CTlsBase::DefaultCleanup ( TValue * value, void * ) inlinestatic ◆ DeleteHolder() virtual void IRWLockHolder_Factory::DeleteHolder ( CRWLockHolder * holder ) pure virtual ◆ DeleteThis() void CRWLockHolder::DeleteThis ( void ) privatevirtual ◆ Deregister() void CUsedTlsBases::Deregister ( CTlsBase * tls ) ◆ Destroy() [1/2] void SSystemFastMutex::Destroy ( void ) ◆ Destroy() [2/2] void SSystemMutex::Destroy ( void ) ◆ DestroyHandle() void SSystemFastMutex::DestroyHandle ( void ) ◆ Detach() void CThread::Detach ( void )Inform the thread that user does not need to wait for its termination.
The thread object will be destroyed by Exit(). If the thread has already been terminated by Exit, Detach() will also schedule the thread object for destruction. NOTE: it is no more safe to use this thread object after Detach(), unless there are still CRef<> based references to it!
Definition at line 833 of file ncbithr.cpp.
References CThread::m_Handle, CThread::m_IsDetached, CThread::m_IsRun, CThread::m_IsTerminated, CThread::m_SelfRef, NCBI_THREAD_VALIDATE, NULL, and CRef< C, Locker >::Reset().
Referenced by CPoolOfThreads< CRef< CStdRequest > >::Register().
◆ Discard() [1/2]template<class TValue >
void CTls< TValue >::Discard ( void ) inlineDiscard thread local storage.
Schedule the TLS to be destroyed as soon as there are no CRef to it left.
Definition at line 223 of file ncbithr.hpp.
◆ Discard() [2/2] bool CThread::Discard ( void ) ◆ DoLock()template<class TLockVect >
◆ Exit() void CThread::Exit ( void * exit_data ) static ◆ FreeUnusedMem() ◆ FromVoidP() [1/2]template<class V >
template<class A >
◆ FromVoidP() [2/2]template<class V >
template<class A >
◆ GetCurrent() ◆ GetCurrentThread() CThread * CThread::GetCurrentThread ( void ) static ◆ GetCurrentThreadSystemID()Get the current thread ID.
Definition at line 152 of file ncbimtx.hpp.
Referenced by CFileIO::CreateTemporary(), CThreadSystemID::GetCurrent(), CThread::GetSystemID(), ncbi_namespace_mutex_mt::SSystemMutex::Lock(), CJaegerTracer::OnRequestStart(), COpentelemetryTracer::OnRequestStart(), CRWLock::ReadLock(), s_GetThreadId(), ncbi_namespace_mutex_mt::SSystemMutex::TryLock(), CRWLock::TryReadLock(), CRWLock::TryWriteLock(), ncbi_namespace_mutex_mt::SSystemMutex::Unlock(), CRWLock::Unlock(), CConditionVariable::WaitForSignal(), CRWLock::WriteLock(), CSyncQueue< Type, Container, Traits >::x_GuardedLock(), CSyncQueue< Type, Container, Traits >::x_IsGuarded(), and CRWLock::x_MayAcquireForReading().
◆ GetErrCodeString() [1/3] const char * CMutexException::GetErrCodeString ( void ) const overridevirtual ◆ GetErrCodeString() [2/3] const char * CConditionVariableException::GetErrCodeString ( void ) const overridevirtual ◆ GetErrCodeString() [3/3] const char * CThreadException::GetErrCodeString ( void ) const overridevirtual ◆ GetFactory()Get factory which this object was created from.
◆ GetHandle() ◆ GetId()template<class TLockVect >
◆ GetLockType() ◆ GetLockVector() ◆ GetRWLock()Get lock object that is locked by this holder.
◆ GetSelf()Definition at line 515 of file ncbithr.cpp.
References CThread::InitializeMainThreadId(), kMainThreadId, sm_MainThreadIdInitialized, and sx_GetNextThreadId().
Referenced by CBlastDbDataLoader::GetLoaderNameFromArgs(), CThreadLocalTransactional::GetTransaction(), CIgBlastnApp::CIgWorker::Main(), CIgBlastnApp::CIgFormatter::Main(), CRandom::Randomize(), CThreadLocalTransactional::RemoveTransaction(), s_CountBlastDbDataLoaders(), s_GetThreadId(), sAssertMainThread(), CBlastNode::SetDataLoaderPrefix(), CThreadLocalTransactional::SetTransaction(), CSeqDBImpl::x_GetCacheID(), CSeqDBVol::x_GetFilteredHeader(), CAsnCache_DataLoader::x_GetIndex(), CSeqDBVol::x_GetTaxonomy(), and SDiagMessage::x_OldWrite().
◆ GetSystemID() ◆ GetThreadHandle() ◆ GetThreadsCount() unsigned int CThread::GetThreadsCount ( ) inlinestatic ◆ GetTimeout() ◆ GetUsedTlsBases() ◆ GetValue() [1/2] ◆ GetValue() [2/2]template<class TValue >
TValue* CTls< TValue >::GetValue ( void ) const inline ◆ Init() [1/2] ◆ Init() [2/2] void CUsedTlsBases::Init ( void ) static ◆ InitializeDynamic() [1/2] void SSystemFastMutex::InitializeDynamic ( void )Initialize dynamic mutex.
Initialize mutex if it located in heap or stack. This must be called only once. Do not count on zeroed memory values for initializing mutex values.
Definition at line 207 of file ncbimtx.cpp.
◆ InitializeDynamic() [2/2] void ncbi_namespace_mutex_mt::SSystemMutex::InitializeDynamic ( void )Initialize dynamic mutex.
Initialize mutex if it located in heap or stack. This must be called only once. Do not count on zeroed memory values for initializing mutex values.
◆ InitializeHandle() void SSystemFastMutex::InitializeHandle ( void ) ◆ InitializeMainThreadId() void CThread::InitializeMainThreadId ( void ) static ◆ InitializeStatic() [1/2] void SSystemFastMutex::InitializeStatic ( void ) ◆ InitializeStatic() [2/2] void ncbi_namespace_mutex_mt::SSystemMutex::InitializeStatic ( void )Initialize static mutex.
Must be called only once.
◆ Is() ◆ IsAppExiting() ◆ IsInitialized() [1/2] bool ncbi_namespace_mutex_mt::SSystemFastMutex::IsInitialized ( void ) constCheck if mutex is initialized.
Check if mutex is initialized.
Check if lock requested is already granted.
◆ IsLocked() [1/3] ◆ IsLocked() [2/3] bool CYieldingRWLock::IsLocked ( void )Check if any type of lock on this object is held.
◆ IsLocked() [3/3] bool CSpinLock::IsLocked ( void ) constCheck if mutex is currently locked.
◆ IsMain() bool CThread::IsMain ( void ) static ◆ IsNot() ◆ IsSupported() bool CConditionVariable::IsSupported ( void ) staticDefinition at line 2358 of file ncbimtx.cpp.
◆ IsTerminated() bool CThread::IsTerminated ( void ) const inline ◆ IsUninitialized() [1/2] bool ncbi_namespace_mutex_mt::SSystemFastMutex::IsUninitialized ( void ) constCheck if mutex is un-initialized.
Check if mutex is un-initialized.
0
)
Wait for the thread termination.
The thread object will be scheduled for destruction right here, inside Join(). Only one call to Join() is allowed.
Definition at line 863 of file ncbithr.cpp.
References CThread::m_ExitData, CThread::m_Handle, CThread::m_IsDetached, CThread::m_IsJoined, CThread::m_IsRun, CThread::m_SelfRef, NCBI_THREAD_VALIDATE, NULL, and CRef< C, Locker >::Reset().
Referenced by CBlastAsyncFormatThread::Join(), CNCMMCentral::PrepareToStop(), CMergeyApp::Run(), CMagicBlastApp::Run(), SGridWorkerNodeImpl::Run(), CSchedulerEngine::ShutDown(), CAsyncTaskProcessor< TTask >::CExecutor::SThread::Stop(), CIStreamIteratorThread_Base< TRoot, TObject >::Stop(), CAsyncDiagThread::Stop(), CBDB_Env::StopBackgroundWriterThread(), CQueueDataBase::StopExecutionWatcherThread(), CQueueDataBase::StopNotifThread(), CBDB_Cache::StopPurgeThread(), CQueueDataBase::StopPurgeThread(), CQueueDataBase::StopServiceThread(), CNetStorageServer::StopServiceThread(), CMMAligner::x_DoSubmatrix(), CNSTDatabase::~CNSTDatabase(), CWGSClient::~CWGSClient(), CWGSDataLoader_Impl::~CWGSDataLoader_Impl(), and SNetScheduleAPIImpl::~SNetScheduleAPIImpl().
◆ Lock() [1/6] ◆ Lock() [2/6] ◆ Lock() [3/6]template<class TLockVect >
◆ Lock() [4/6] void CFastMutex::Lock ( void )Acquire mutex for the current thread with no nesting checks.
Referenced by CRtProfiler::AddMarkerMT(), CRtProfiler::AddUserKVMT(), CRtProfiler::AsStringMT(), BlastLockHandler(), CBlastAsyncFormatThread::Finalize(), CServer_ConnectionPool::GetListenerPorts(), CServer_ConnectionPool::GetPollAndTimerVec(), CBDB_Cache::Lock(), CDBConnectionFactory::CServiceInfo::Lock(), CBlastAsyncFormatThread::Main(), CBlastKmerThread::Main(), CBlastAsyncFormatThread::QueueResults(), CFastRWLock::ReadLock(), CServer_ConnectionPool::RemoveListener(), CServer_ConnectionPool::SetAllActive(), CRtProfiler::StartMT(), CRtProfiler::StopMT(), CThreadGroup::SyncPoint(), CFastRWLock::WriteLock(), CNCMMCentral::x_DoBackgroundWork(), and CNSTDBConnectionThread::x_RestoreConnection().
◆ Lock() [5/6] void CMutex::Lock ( void ) ◆ Lock() [6/6] void CSpinLock::Lock ( void )Lock the mutex.
Definition at line 2326 of file ncbimtx.cpp.
References CSpinLock::m_Value, NCBI_SCHED_YIELD, NULL, and SwapPointers().
Referenced by CObjPool< CRWLockHolder, THolderPoolFactory >::Clear(), CObjPool< CRWLockHolder, THolderPoolFactory >::Get(), CObjPool< CRWLockHolder, THolderPoolFactory >::Return(), CRWLockHolder::x_OnLockAcquired(), and CRWLockHolder::x_OnLockReleased().
◆ Main() virtual void* CThread::Main ( void ) protectedpure virtualDerived (user-created) class must provide a real thread function.
Implemented in CBlastNode, CIStreamStdIteratorThread< TRoot, TObject >, CIStreamObjectIteratorThread< TRoot, TObject >, CThreadPool_ServiceThread, CScheduler_ExecThread_Impl, CSeqDBDemo_Thread, CTotalRangeThread, CMTTestThread, CSchedulerEngineThread, CSQLITE_AsyncWritesThread, CInGroupThread, CTestThread, CAsyncDiagThread, CWorkerNodeIdleThread, CGridControlThread, CNetStorageServiceThread, CNSTDBConnectionThread, CJobQueueExecutionWatcherThread, CJobQueueCleanerThread, CServiceThread, CGetJobNotificationThread, CMagicBlastThread, CIgBlastnApp::CIgFormatter, CIgBlastnApp::CIgWorker, CAsyncTaskProcessor< TTask >::CExecutor::SThread, CTblastnNode, CRPSTBlastnNode, CRPSBlastNode, CBlastxNode, CBlastpNode, CBlastnNode, CSearch< LEGACY, NHITS >, CVDBThread, CTestThread, CSeqDBTest3Thread, CSeqDBTest2Thread, CSeqDBTestThread, CDLTest2Thread, CDLTestThread, CHspStreamWriteThread, CBlastKmerThread, CRPSThread, CPrelimSearchThread, CMergeOutputThread, CMergeTreeThread, CThreadInPool< TRequest >, CThreadInPool< CRef< CStdRequest > >, CThreadPool_Thread, CThreadNonStop, CIStreamIteratorThread_Base< TRoot, TObject >, CPrefetchThreadOld, CAssemblyCache::CWorkerThread, CConnTestThread, CThreadInPool_ForServer, CBlastAsyncFormatThread, CLocalAdapterThread, CJobCommitterThread, CGridCleanupThread, SNetScheduleNotificationThread, CMainLoopThread, CAsn2AsnThread, CNWAlignerThread_Align, CThreadDoSM, CThreadRunOnTop, and CSQLITE3_Cache::CWriterThread.
Referenced by CThread::Wrapper().
◆ NCBI_EXCEPTION_DEFAULT() [1/3] ◆ NCBI_EXCEPTION_DEFAULT() [2/3] ◆ NCBI_EXCEPTION_DEFAULT() [3/3] ◆ NCBI_SwapPointers() void* NCBI_SwapPointers ( void *volatile * location, void * new_value ) inline ◆ OnExit() void CThread::OnExit ( void ) protectedvirtualOverride this to execute finalization code.
Unlike destructor, this code will be executed before thread termination and as a part of the thread.
Reimplemented in CSeqDBDemo_Thread, CTestThread, CWorkerNodeIdleThread, CGridControlThread, CIgBlastnApp::CIgFormatter, CIgBlastnApp::CIgWorker, CSearch< LEGACY, NHITS >, CHspStreamWriteThread, CThreadInPool< TRequest >, CThreadInPool< CRef< CStdRequest > >, CThreadPool_Thread, CNWAlignerThread_Align, CThreadDoSM, and CThreadRunOnTop.
Definition at line 940 of file ncbithr.cpp.
Referenced by CGridControlThread::OnExit(), and CThread::Wrapper().
◆ OnLockAcquired() virtual void IRWLockHolder_Listener::OnLockAcquired ( CRWLockHolder * holder ) pure virtualCallback called when lock represented by CRWLockHolder is acquired.
◆ OnLockReleased() virtual void IRWLockHolder_Listener::OnLockReleased ( CRWLockHolder * holder ) pure virtualCallback called when lock represented by CRWLockHolder is released.
◆ operator SSystemFastMutex &() CFastMutex::operator SSystemFastMutex & ( void )Get SSystemFastMutex.
◆ operator SSystemMutex &() CMutex::operator SSystemMutex & ( void )Get SSystemMutex.
◆ operator value_type() ◆ operator!=() ◆ operator()() [1/4] ◆ operator()() [2/4] ◆ operator()() [3/4] ◆ operator()() [4/4] ◆ operator=() [1/12]Private assignment operator to disallow assignment.
◆ operator=() [2/12] ◆ operator=() [3/12] ◆ operator=() [4/12]template<class TLockVect >
◆ operator=() [5/12]Private assignment operator to disallow assignment.
◆ operator=() [6/12]Private assignment operator to disallow assignment.
◆ operator=() [7/12] ◆ operator=() [8/12]Private assignment operator to disallow assignment.
◆ operator=() [9/12] ◆ operator=() [10/12] ◆ operator=() [11/12] ◆ operator=() [12/12] ◆ operator==() ◆ Post() void CSemaphore::Post ( unsigned int count =1
)
Increment the semaphore by "count".
Do nothing and throw an exception if counter would exceed "max_count".
Definition at line 1971 of file ncbimtx.cpp.
References SSemaphore::cond, SSemaphore::count, count, kMax_UInt, CSemaphore::m_Sem, SSemaphore::max_count, SSemaphore::mutex, NULL, SSemaphore::wait_count, xncbi_Validate, xncbi_ValidateAndErrnoReport, and xncbi_ValidatePthread.
Referenced by CThreadPool_Impl::Abort(), CPrefetchTokenOld_Impl::AddResolvedId(), CSchedulerEngine::CancelJob(), CBlastAsyncFormatThread::Finalize(), CTestThread::GlobalSyncPoint(), CThreadGroup::Go(), SServerNotifications::InterruptWait(), SGridWorkerNodeImpl::LeaveExclusiveMode(), CGridCleanupThread::Main(), CBlastAsyncFormatThread::Main(), CIgBlastnApp::CIgWorker::Main(), CAsyncDiagThread::Main(), impl::CDriverContext::MakePooledConnection(), CPSGL_QueueGuard::MarkAsFinished(), CIStreamIteratorThread_Base< TRoot, TObject >::Next(), CPrefetchTokenOld_Impl::NextBioseqHandle(), CScheduler_ExecThread_Impl::OnNextExecutionTimeChange(), CBlastAsyncFormatThread::QueueResults(), SServerNotifications::RegisterServer(), CPrefetchTokenOld_Impl::RemoveTokenReference(), CThreadNonStop::RequestDoJob(), CWorkerNodeIdleThread::RequestShutdown(), CThreadNonStop::RequestStop(), CGetJobNotificationThread::RequestStop(), CJobQueueCleanerThread::RequestStop(), CJobQueueExecutionWatcherThread::RequestStop(), CWorkerNodeIdleThread::Schedule(), CIStreamIteratorThread_Base< TRoot, TObject >::SetObject(), CSchedulerEngine::ShutDown(), CSchedulerEngine::StartJob(), CIStreamIteratorThread_Base< TRoot, TObject >::Stop(), CAsyncDiagThread::Stop(), CScheduler_ExecThread_Impl::Stop(), CBDB_Cache::StopPurge(), CWorkerNodeIdleThread::Suspend(), CThreadGroup::SyncPoint(), CThreadPool_Impl::TaskFinished(), CThreadGroup::ThreadComplete(), CThreadPool_Impl::ThreadStateChanged(), SGridWorkerNodeImpl::WaitForExclusiveJobToFinish(), CJobCommitterThread::WakeUp(), CGetJobNotificationThread::WakeUp(), CNSTDBConnectionThread::Wakeup(), CThreadPool_ThreadImpl::WakeUp(), CThreadPool_ServiceThread::WakeUp(), impl::CDriverContext::x_Recycle(), CReader::x_ReleaseClosedConnection(), and CReader::x_ReleaseConnection().
◆ ReadLock() [1/2] void CRWLock::ReadLock ( void )Read lock.
Acquire the R-lock. If W-lock is already acquired by another thread, then wait until it is released.
Definition at line 863 of file ncbimtx.cpp.
References _VERIFY, CRWLock::fTrackReaders, GetCurrentThreadSystemID(), HANDLE, interlocked_dec_max(), interlocked_inc_min(), CRWLock::m_Count, CRWLock::m_Flags, CRWLock::m_Owner, CRWLock::m_Readers, CRWLock::m_RW, CRWLock::m_WaitingWriters, TRUE, CRWLock::x_MayAcquireForReading(), xncbi_Validate, xncbi_ValidateAndErrnoReport, and xncbi_ValidatePthread.
Referenced by IRegistry::ReadLock(), s_LOCK_Handler(), and CRWLock::TryReadLock().
◆ ReadLock() [2/2] void CFastRWLock::ReadLock ( void ) ◆ ReadUnlock() void CFastRWLock::ReadUnlock ( void ) ◆ Register() void CUsedTlsBases::Register ( CTlsBase * tls ) ◆ Release()template<class TLockVect >
◆ ReleaseLock() void CRWLockHolder::ReleaseLock ( void ) ◆ RemoveListener()Remove object keeping track of holder state changes.
◆ Reset() [1/2] void CRWLockHolder::Reset ( void ) ◆ Reset() [2/2]template<class TValue >
void CTls< TValue >::Reset ( void ) inline ◆ Run()Run the thread.
Create a new thread, initialize it, and call user-provided Main() method.
Definition at line 724 of file ncbithr.cpp.
References CRequestContext::Clone(), FALSE, flags, CThread::fRunAllowST, CThread::fRunCloneRequestContext, CThread::fRunDetached, CThread::fRunNice, CThread::fRunUnbound, CDiagContext::GetRequestContext(), HANDLE, CUsedTlsBases::Init(), CThread::m_Handle, CThread::m_IsDetached, CThread::m_IsRun, CThread::m_ParentRequestContext, CThread::m_SelfRef, NCBI_THREAD_VALIDATE, NULL, CRef< C, Locker >::Reset(), CThread::sm_ThreadsCount, ThreadWrapperCallerImpl(), and CThread::Wrapper().
Referenced by BOOST_AUTO_TEST_CASE(), CNSTDatabase::CNSTDatabase(), CScheduler_ExecThread_Impl::CScheduler_ExecThread_Impl(), CSchedulerEngine::CSchedulerEngine(), CWGSDataLoader_Impl::GetResolver(), CWGSClient::GetWGSResolver(), CAsyncDiagHandler::InstallToDiag(), CDataSource::Prefetch(), CMergeyApp::Run(), CMagicBlastApp::Run(), SGridWorkerNodeImpl::Run(), CBlastKmerApplication::Run(), CBDB_Env::RunBackgroundWriter(), CQueueDataBase::RunExecutionWatcherThread(), CNCMMCentral::RunLateInit(), CQueueDataBase::RunNotifThread(), CQueueDataBase::RunPurgeThread(), CQueueDataBase::RunServiceThread(), CNetStorageServer::RunServiceThread(), CThreadPool_Impl::SetInterfaceStarted(), CAsyncTaskProcessor< CRemoteAppReaperTask >::CExecutor::Start(), SNetScheduleAPIImpl::StartNotificationThread(), CBDB_Cache::StartPurgeThread(), CMMAligner::x_DoSubmatrix(), and CNWAligner::x_Run().
◆ Set() ◆ SetCurrentThreadName()Set name for the current thread.
This works on most POSIX platforms, no-op on other platforms
Definition at line 958 of file ncbithr.cpp.
References CTempString::data().
Referenced by CMainLoopThread::Main(), SNetScheduleNotificationThread::Main(), CJobCommitterThread::Main(), CThreadInPool_ForServer::Main(), CThreadInPool< TRequest >::Main(), CAsyncTaskProcessor< TTask >::CExecutor::SThread::Main(), CGetJobNotificationThread::Main(), CServiceThread::Main(), CJobQueueCleanerThread::Main(), CJobQueueExecutionWatcherThread::Main(), CNSTDBConnectionThread::Main(), CNetStorageServiceThread::Main(), CGridControlThread::Main(), CWorkerNodeIdleThread::Main(), and CAsyncDiagThread::Main().
◆ SetId()template<class TLockVect >
◆ SetValue() [1/2] ◆ SetValue() [2/2]Set value.
Cleanup previously stored value, and set the new value. The "cleanup" function and "cleanup_data" will be used to destroy the new "value" in the next call to SetValue() or Reset(). Do not cleanup if the new value is equal to the old one.
Definition at line 203 of file ncbithr.hpp.
Referenced by CCgiApplication::x_CreateProcessor(), and CLDS2_UrlHandler_File::x_GetStreamCache().
◆ SetWaitForAllThreadsTimeout() void CThread::SetWaitForAllThreadsTimeout ( const CTimeout & timeout ) static ◆ SignalAll() void CConditionVariable::SignalAll ( void ) ◆ SignalSome() void CConditionVariable::SignalSome ( void ) ◆ TakeFrom() ◆ ThrowLockFailed() void SSystemFastMutex::ThrowLockFailed ( void ) static ◆ ThrowNotOwned() void SSystemMutex::ThrowNotOwned ( void ) static ◆ ThrowTryLockFailed() void SSystemFastMutex::ThrowTryLockFailed ( void ) static ◆ ThrowUninitialized() void SSystemFastMutex::ThrowUninitialized ( void ) static ◆ ThrowUnlockFailed() void SSystemFastMutex::ThrowUnlockFailed ( void ) static ◆ ToVoidP() [1/2]template<class V >
template<class A >
Definition at line 256 of file ncbithr.hpp.
◆ ToVoidP() [2/2]template<class V >
template<class A >
Definition at line 248 of file ncbithr.hpp.
◆ TryLock() [1/6] ◆ TryLock() [2/6] bool SSystemFastMutex::TryLock ( void ) ◆ TryLock() [3/6] bool SSystemMutex::TryLock ( void ) ◆ TryLock() [4/6] bool CFastMutex::TryLock ( void )Try locking the mutex.
◆ TryLock() [5/6] bool CMutex::TryLock ( void ) ◆ TryLock() [6/6] bool CSpinLock::TryLock ( void ) ◆ TryReadLock() [1/2]Try read lock with timeout.
Definition at line 1050 of file ncbimtx.cpp.
References _VERIFY, CRWLock::fTrackReaders, CTimeout::GetAsMilliSeconds(), GetCurrentThreadSystemID(), CDeadline::GetExpirationTime(), CTimeout::GetNano(), HANDLE, interlocked_dec_max(), interlocked_inc_min(), CTimeout::IsInfinite(), CTimeout::IsZero(), CRWLock::m_Count, CRWLock::m_Flags, CRWLock::m_Owner, CRWLock::m_Readers, CRWLock::m_RW, CRWLock::m_WaitingWriters, ok, CRWLock::ReadLock(), TRUE, CRWLock::TryReadLock(), CRWLock::x_MayAcquireForReading(), xncbi_Validate, and xncbi_ValidateAndErrnoReport.
◆ TryReadLock() [2/2] bool CRWLock::TryReadLock ( void )Try read lock.
Try to acquire R-lock and return immediately.
Definition at line 976 of file ncbimtx.cpp.
References _VERIFY, CRWLock::fTrackReaders, GetCurrentThreadSystemID(), interlocked_dec_max(), interlocked_inc_min(), CRWLock::m_Count, CRWLock::m_Flags, CRWLock::m_Owner, CRWLock::m_Readers, CRWLock::m_RW, CRWLock::x_MayAcquireForReading(), and xncbi_Validate.
Referenced by s_LOCK_Handler(), and CRWLock::TryReadLock().
◆ TryWait() [1/2] ◆ TryWait() [2/2] bool CSemaphore::TryWait ( unsigned int timeout_sec =0
, unsigned int timeout_nsec = 0
)
Timed wait.
Wait up to timeout_sec + timeout_nsec/1E9 seconds for the semaphore's count to exceed zero. If that happens, decrement the counter by one and return TRUE; otherwise, return FALSE.
Definition at line 1844 of file ncbimtx.cpp.
References SSemaphore::cond, SSemaphore::count, gettimeofday(), kMax_Int, CSemaphore::m_Sem, SSemaphore::mutex, SSemaphore::wait_count, xncbi_Validate, and xncbi_ValidatePthread.
Referenced by SGridWorkerNodeImpl::EnterExclusiveMode(), CBDB_Cache::EvaluateTimeLine(), SServerNotifications::GetNextNotification(), SServerNotifications::InterruptWait(), CThreadNonStop::Main(), CGetJobNotificationThread::Main(), CJobQueueCleanerThread::Main(), CJobQueueExecutionWatcherThread::Main(), CWorkerNodeIdleThread::Main(), CScheduler_ExecThread_Impl::Main(), impl::CDriverContext::MakePooledConnection(), CBDB_Cache::Purge(), CSemaphore::TryWait(), CGridCleanupThread::Wait(), SGridWorkerNodeImpl::WaitForExclusiveJobToFinish(), CJobCommitterThread::WaitForTimeout(), CNSTDBConnectionThread::x_CreateDatabase(), CThreadPool_ServiceThread::x_Idle(), CSyncQueue< Type, Container, Traits >::x_LockAndWait(), impl::CDriverContext::x_Recycle(), CNSTDBConnectionThread::x_RestoreConnection(), CBlockingQueue< TRequest >::x_WaitForPredicate(), CThreadPool_Impl::x_WaitForPredicate(), and CSchedulerEngine::x_WorkOnThread().
◆ TryWriteLock() [1/2]Try write lock with timeout.
Definition at line 1386 of file ncbimtx.cpp.
References _ASSERT, _VERIFY, CRWLock::fFavorWriters, CTimeout::GetAsMilliSeconds(), GetCurrentThreadSystemID(), CDeadline::GetExpirationTime(), CTimeout::GetNano(), HANDLE, interlocked_dec_max(), interlocked_set(), CTimeout::IsInfinite(), CTimeout::IsZero(), CRWLock::m_Count, CRWLock::m_Flags, CRWLock::m_Owner, CRWLock::m_Readers, CRWLock::m_RW, CRWLock::m_WaitingWriters, ok, TRUE, CRWLock::TryWriteLock(), CRWLock::WriteLock(), xncbi_Validate, and xncbi_ValidateAndErrnoReport.
◆ TryWriteLock() [2/2] bool CRWLock::TryWriteLock ( void )Try write lock.
Try to acquire W-lock and return immediately.
Definition at line 1320 of file ncbimtx.cpp.
References _ASSERT, _VERIFY, GetCurrentThreadSystemID(), HANDLE, interlocked_dec_max(), interlocked_set(), CRWLock::m_Count, CRWLock::m_Owner, CRWLock::m_Readers, CRWLock::m_RW, TRUE, and xncbi_Validate.
Referenced by s_LOCK_Handler(), and CRWLock::TryWriteLock().
◆ Unlock() [1/8]template<class TLockVect >
◆ Unlock() [2/8] ◆ Unlock() [3/8] ◆ Unlock() [4/8]Unlock object.
Definition at line 304 of file lock_vector.hpp.
References _ASSERT.
◆ Unlock() [5/8] void CFastMutex::Unlock ( void )Release mutex with no owner or nesting checks.
Referenced by CRtProfiler::AddMarkerMT(), CRtProfiler::AddUserKVMT(), CRtProfiler::AsStringMT(), BlastLockHandler(), CBlastAsyncFormatThread::Finalize(), CServer_ConnectionPool::GetListenerPorts(), CServer_ConnectionPool::GetPollAndTimerVec(), CBlastAsyncFormatThread::Main(), CBlastKmerThread::Main(), CBlastAsyncFormatThread::QueueResults(), CFastRWLock::ReadLock(), CServer_ConnectionPool::RemoveListener(), CServer_ConnectionPool::SetAllActive(), CRtProfiler::StartMT(), CRtProfiler::StopMT(), CThreadGroup::SyncPoint(), CBDB_Cache::Unlock(), CDBConnectionFactory::CServiceInfo::Unlock(), CConditionVariable::WaitForSignal(), CFastRWLock::WriteUnlock(), CNCMMCentral::x_DoBackgroundWork(), and CNSTDBConnectionThread::x_RestoreConnection().
◆ Unlock() [6/8] void CMutex::Unlock ( void ) ◆ Unlock() [7/8] void CSpinLock::Unlock ( void )Unlock the mutex.
There's no check that mutex is unlocked by the same thread that locked it.
Definition at line 2342 of file ncbimtx.cpp.
References _VERIFY, CSpinLock::m_Value, NULL, and SwapPointers().
Referenced by CObjPool< CRWLockHolder, THolderPoolFactory >::Clear(), CObjPool< CRWLockHolder, THolderPoolFactory >::Get(), CObjPool< CRWLockHolder, THolderPoolFactory >::Return(), CRWLockHolder::x_OnLockAcquired(), and CRWLockHolder::x_OnLockReleased().
◆ Unlock() [8/8] void CRWLock::Unlock ( void )Release the RW-lock.
Definition at line 1558 of file ncbimtx.cpp.
References _ASSERT, _VERIFY, cnt, CRWLock::fTrackReaders, GetCurrentThreadSystemID(), interlocked_dec_min(), interlocked_inc_max(), CRWLock::m_Count, CRWLock::m_Flags, CRWLock::m_Owner, CRWLock::m_Readers, CRWLock::m_RW, CRWLock::m_WaitingWriters, xncbi_Validate, and xncbi_ValidatePthread.
Referenced by s_LOCK_Handler(), and IRegistry::Unlock().
◆ Wait() void CSemaphore::Wait ( void )Wait on semaphore.
Decrement the counter by one. If the semaphore's count is zero then wait until it's not zero.
Definition at line 1787 of file ncbimtx.cpp.
References SSemaphore::cond, SSemaphore::count, CSemaphore::m_Sem, SSemaphore::mutex, SSemaphore::wait_count, xncbi_Validate, and xncbi_ValidatePthread.
Referenced by CPSGL_QueueGuard::GetNextResult(), CTestThread::GlobalSyncPoint(), CJobCommitterThread::Main(), CBlastAsyncFormatThread::Main(), CPrefetchThreadOld::Main(), CNSTDBConnectionThread::Main(), CAsyncDiagThread::Main(), CThreadPool_ServiceThread::Main(), CIStreamObjectIteratorThread< TRoot, TObject >::Main(), CIStreamStdIteratorThread< TRoot, TObject >::Main(), CIStreamIteratorThread_Base< TRoot, TObject >::Next(), CIStreamIteratorThread_Base< TRoot, TObject >::SetObject(), CThreadGroup::SyncPoint(), CThreadGroup::ThreadWait(), CSemaphore::TryWait(), CPSGL_RequestTracker::WaitForBackgroundTasks(), CReader::x_AllocConnection(), CThreadPool_ThreadImpl::x_Idle(), CSyncQueue< Type, Container, Traits >::x_LockAndWait(), and CThreadPool_Impl::x_WaitForPredicate().
◆ WaitForAllThreads() bool CThread::WaitForAllThreads ( void ) staticprivate ◆ WaitForSignal() [1/2]Release mutex and lock the calling thread until the condition variable is signalled.
Definition at line 2579 of file ncbimtx.cpp.
References CFastMutex::Unlock(), and CConditionVariable::x_WaitForSignal().
◆ WaitForSignal() [2/2] ◆ Wrapper()Function to use (internally) as the thread's startup function.
Definition at line 552 of file ncbithr.cpp.
References CUsedTlsBases::ClearAllCurrentThread(), CExitThreadException::EnterWrapper(), CThread::IsMain(), CThread::m_ExitData, CThread::m_IsDetached, CThread::m_IsTerminated, CThread::m_ParentRequestContext, CThread::m_SelfRef, CThread::Main(), NCBI_CATCH_ALL_X, NCBI_CATCH_X, CThread::OnExit(), CRef< C, Locker >::Reset(), CDiagContext::SetRequestContext(), CThread::sm_ThreadsCount, CThread::x_InitializeThreadId(), and xncbi_Validate.
Referenced by CThread::Run(), and ThreadWrapperCaller().
◆ WriteLock() [1/2] void CRWLock::WriteLock ( void )Write lock.
Acquire the W-lock. If R-lock or W-lock is already acquired by another thread, then wait until it is released.
Definition at line 1201 of file ncbimtx.cpp.
References _ASSERT, _VERIFY, CRWLock::fFavorWriters, GetCurrentThreadSystemID(), HANDLE, interlocked_dec_max(), interlocked_set(), CRWLock::m_Count, CRWLock::m_Flags, CRWLock::m_Owner, CRWLock::m_Readers, CRWLock::m_RW, CRWLock::m_WaitingWriters, TRUE, xncbi_Validate, xncbi_ValidateAndErrnoReport, and xncbi_ValidatePthread.
Referenced by s_LOCK_Handler(), CRWLock::TryWriteLock(), and IRegistry::WriteLock().
◆ WriteLock() [2/2] void CFastRWLock::WriteLock ( void ) ◆ WriteUnlock() void CFastRWLock::WriteUnlock ( void ) ◆ x_CleanupThreadCallback() void CTlsBase::x_CleanupThreadCallback ( void * ptr ) staticprivate ◆ x_DeleteTlsData() ◆ x_Destroy() void CTlsBase::x_Destroy ( void ) protected ◆ x_GetKey() ◆ x_GetKeyLong() ◆ x_GetTlsData() ◆ x_GetValue() void * CTlsBase::x_GetValue ( void ) const inlineprotected ◆ x_Init() void CTlsBase::x_Init ( void ) protected ◆ x_InitializeThreadId() void CThread::x_InitializeThreadId ( void ) private ◆ x_MayAcquireForReading() ◆ x_OnLockAcquired() void CRWLockHolder::x_OnLockAcquired ( void ) private ◆ x_OnLockReleased() void CRWLockHolder::x_OnLockReleased ( void ) private ◆ x_ReleaseLock()Main implementation releasing lock.
Definition at line 2265 of file ncbimtx.cpp.
References eReadLock, eWriteLock, CRWLockHolder::m_LockAcquired, CYieldingRWLock::m_Locks, CYieldingRWLock::m_LockWaits, CYieldingRWLock::m_ObjLock, CRWLockHolder::m_Type, NON_CONST_ITERATE, CRef< C, Locker >::NotNull(), and CRWLockHolder::x_OnLockReleased().
◆ x_Reset() void CTlsBase::x_Reset ( void ) protected ◆ x_SetValue()Helper method to set thread data.
Definition at line 274 of file ncbithr.cpp.
References cleanup(), CTlsBase::CleanupTlsData(), CTlsBase::eSkipCleanup, CUsedTlsBases::GetUsedTlsBases(), CTlsBase::STlsData::m_CleanupData, CTlsBase::STlsData::m_CleanupFunc, CTlsBase::m_Initialized, CTlsBase::m_Key, CTlsBase::STlsData::m_Native, CTlsBase::STlsData::m_Value, CUsedTlsBases::Register(), s_TlsSetValue(), rapidjson::value, CTlsBase::x_GetTlsData(), and xncbi_Validate.
Referenced by CTls< CCgiRequestProcessor >::SetValue().
◆ x_WaitForSignal() bool CConditionVariable::x_WaitForSignal ( SSystemFastMutex & mutex, const CDeadline & timeout ) private ◆ ~CConditionVariable() CConditionVariable::~CConditionVariable ( void ) ◆ ~CFastMutex() CFastMutex::~CFastMutex ( void )Destructor.
Close mutex handle. No checks if it's still acquired.
◆ ~CFastRWLock() CFastRWLock::~CFastRWLock ( void ) ◆ ~CLockVector() ◆ ~CLockVectorGuard()template<class TLockVect >
◆ ~CMutex()Destructor.
Report error if the mutex is locked.
◆ ~CRWLock() CRWLock::~CRWLock ( void ) ◆ ~CRWLockHolder() CRWLockHolder::~CRWLockHolder ( void ) virtual ◆ ~CSemaphore() CSemaphore::~CSemaphore ( void ) ◆ ~CSpinLock() CSpinLock::~CSpinLock ( void ) ◆ ~CThread() CThread::~CThread ( void ) protectedvirtual ◆ ~CTlsBase() CTlsBase::~CTlsBase ( void ) inlineprotected ◆ ~CUsedTlsBases() CUsedTlsBases::~CUsedTlsBases ( void )Definition at line 77 of file ncbithr.cpp.
◆ ~CYieldingRWLock() CYieldingRWLock::~CYieldingRWLock ( void ) ◆ ~IRWLockHolder_Factory() IRWLockHolder_Factory::~IRWLockHolder_Factory ( void ) virtualDefinition at line 2100 of file ncbimtx.cpp.
◆ ~IRWLockHolder_Listener() IRWLockHolder_Listener::~IRWLockHolder_Listener ( void ) virtualDefinition at line 2097 of file ncbimtx.cpp.
◆ kThreadID_None ◆ m_AutoDestroy bool CTlsBase::m_AutoDestroy private ◆ m_Cleanup ◆ m_CleanupData void* CTlsBase::STlsData::m_CleanupData ◆ m_CleanupFunc ◆ m_ConditionVar CONDITION_VARIABLE CConditionVariable::m_ConditionVar private ◆ m_Count [1/2] atomic<int> ncbi_namespace_mutex_mt::SSystemMutex::m_Count# of recursive (in the same thread) locks
Definition at line 415 of file ncbimtx.hpp.
◆ m_Count [2/2] volatile long CRWLock::m_Count private ◆ m_ExitData void* CThread::m_ExitData private ◆ m_Factory [1/2] ◆ m_Factory [2/2] ◆ m_Flags ◆ m_Handle [1/2] TSystemMutex ncbi_namespace_mutex_mt::SSystemFastMutex::m_Handle ◆ m_Handle [2/2] ◆ m_ID TID CThreadSystemID::m_ID ◆ m_Idtemplate<class TLockVect >
◆ m_IdVector ◆ m_IdVector_Lock ◆ m_Initialized bool CTlsBase::m_Initialized private ◆ m_IsDetached bool CThread::m_IsDetached private ◆ m_IsJoined ◆ m_IsRun ◆ m_IsTerminated bool CThread::m_IsTerminated private ◆ m_Key [1/2] ◆ m_Key [2/2] ◆ m_Listeners ◆ m_Lock ◆ m_LockAcquired bool CRWLockHolder::m_LockAcquired private ◆ m_LockCount ◆ m_Locks int CYieldingRWLock::m_Locks[2] private ◆ m_LockSettemplate<class TLockVect >
◆ m_LockVectortemplate<class TLockVect >
◆ m_LockWaits ◆ m_Magic volatile EMagic ncbi_namespace_mutex_mt::SSystemFastMutex::m_Magic ◆ m_Mutex [1/3] ◆ m_Mutex [2/3] SSystemFastMutex CFastMutex::m_Mutex private ◆ m_Mutex [3/3] SSystemMutex CMutex::m_Mutex private ◆ m_Native ◆ m_ObjLock [1/2] ◆ m_ObjLock [2/2] ◆ m_Owner [1/2]Platform-dependent owner thread ID.
Definition at line 413 of file ncbimtx.hpp.
◆ m_Owner [2/2] ◆ m_ParentRequestContext ◆ m_Readers ◆ m_RW ◆ m_SelfRef ◆ m_Sem ◆ m_Spins ◆ m_Timeouttemplate<class TLockVect >
◆ m_Type ◆ m_UsedTls ◆ m_Value [1/2] void* volatile CSpinLock::m_Value private ◆ m_Value [2/2] void* CTlsBase::STlsData::m_Value ◆ m_WaitCounter ◆ m_WaitingWriters volatile unsigned int CRWLock::m_WaitingWriters private ◆ m_WaitMutex SSystemFastMutex* volatile CConditionVariable::m_WaitMutex private ◆ m_WriteLock ◆ sm_IsExiting ◆ sm_ThreadsCount atomic< unsigned int > CThread::sm_ThreadsCount staticprivate ◆ sm_UsedTlsBases ◆ sm_WaitForThreadsTimeout ◆ ::ncbi::CAutoInitializeStaticFastMutex friend class ::ncbi::CAutoInitializeStaticFastMutex friendDefinition at line 377 of file ncbimtx.hpp.
◆ ::ncbi::CAutoInitializeStaticMutex friend class ::ncbi::CAutoInitializeStaticMutex friendDefinition at line 472 of file ncbimtx.hpp.
◆ ::ncbi::CFastMutex friend class ::ncbi::CFastMutex friendDefinition at line 378 of file ncbimtx.hpp.
◆ ::ncbi::CMutex friend class ::ncbi::CMutex friendDefinition at line 473 of file ncbimtx.hpp.
◆ ::ncbi::CSafeStaticPtr_Base friend class ::ncbi::CSafeStaticPtr_Base friendDefinition at line 379 of file ncbimtx.hpp.
◆ CNcbiApplicationAPI ◆ CRef< CThread > ◆ CRef< CTlsBase > ◆ CRWLock [1/2] ◆ CRWLock [2/2]Allow use of m_Mtx and m_Owner members directly.
Definition at line 807 of file ncbimtx.hpp.
◆ CRWLockHolder ◆ CStaticTlsHelper friend class CStaticTlsHelper friendDefinition at line 69 of file ncbithr.hpp.
◆ CTlsBase ◆ CUsedTlsBases [1/2] ◆ CUsedTlsBases [2/2] ◆ CYieldingRWLock ◆ SSystemMutex ◆ ThreadWrapperCallerRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4