#include <ncbimtx.hpp>
Inheritance diagram for SSystemFastMutex:

Define system fast mutex.
Internal platform-dependent fast mutex implementation to be used by CMutex and CFastMutex only.
Definition at line 260 of file ncbimtx.hpp.
Public Types | |
| enum | EMagic { eMutexUninitialized = 0, eMutexInitialized = 0x2487adab } |
| Initialization flag values. More... | |
Public Member Functions | |
| void | Lock (void) |
| Acquire mutex for the current thread with no nesting checks. | |
| void | Unlock (void) |
| Release mutex with no owner or nesting checks. | |
| bool | TryLock (void) |
| Try to lock. | |
| void | CheckInitialized (void) const |
| Check initialized value of mutex. | |
Static Public Member Functions | |
| static void | ThrowUninitialized (void) |
| Throw uninitialized ("eUninitialized") exception. | |
| static void | ThrowLockFailed (void) |
| Throw lock failed("eLocked") exception. | |
| static void | ThrowUnlockFailed (void) |
| Throw unlock failed("eUnlocked") exception. | |
| static void | ThrowTryLockFailed (void) |
| Throw try lock failed("eTryLock") exception. | |
Public Attributes | |
| TSystemMutex | m_Handle |
| Mutex handle. | |
| volatile EMagic | m_Magic |
| Magic flag. | |
Protected Member Functions | |
| bool | IsInitialized (void) const |
| Check if mutex is initialized. | |
| bool | IsUninitialized (void) const |
| Check if mutex is un-initialized. | |
| void | InitializeStatic (void) |
| Initialize static mutex. | |
| void | InitializeDynamic (void) |
| Initialize dynamic mutex. | |
| void | Destroy (void) |
| Destroy mutex. | |
| void | InitializeHandle (void) |
| Initialize mutex handle. | |
| void | DestroyHandle (void) |
| Destroy mutex handle. | |
Friends | |
| struct | SSystemMutex |
| class | CAutoInitializeStaticFastMutex |
| class | CFastMutex |
| class | CSafeStaticPtr_Base |
|
|
Initialization flag values.
Definition at line 265 of file ncbimtx.hpp. |
|
|
Check initialized value of mutex.
Referenced by SSystemMutex::Lock(), Lock(), SSystemMutex::TryLock(), TryLock(), SSystemMutex::Unlock(), and Unlock(). |
|
|
Destroy mutex.
Definition at line 172 of file ncbimtx.cpp. References DestroyHandle(), eMutexUninitialized, IsInitialized(), m_Magic, and xncbi_Validate. Referenced by SSystemMutex::Destroy(). |
|
|
Destroy mutex handle. Must be called only once. Definition at line 125 of file ncbimtx.cpp. References m_Handle, WRITE_MUTEX_EVENT, and xncbi_Verify. Referenced by Destroy(). |
|
|
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 162 of file ncbimtx.cpp. References eMutexInitialized, InitializeHandle(), and m_Magic. |
|
|
Initialize mutex handle. Must be called only once. Definition at line 96 of file ncbimtx.cpp. References FALSE, m_Handle, WRITE_MUTEX_EVENT, and xncbi_Validate. Referenced by InitializeDynamic(), and InitializeStatic(). |
|
|
Initialize static mutex. Must be called only once. Definition at line 141 of file ncbimtx.cpp. References eMutexInitialized, eMutexUninitialized, InitializeHandle(), m_Magic, and xncbi_Validate. |
|
|
Check if mutex is initialized.
Referenced by Destroy(). |
|
|
Check if mutex is un-initialized.
|
|
|
Acquire mutex for the current thread with no nesting checks.
Definition at line 211 of file ncbimtx.cpp. References CheckInitialized(), m_Handle, ThrowLockFailed(), and WRITE_MUTEX_EVENT. |
|
|
Throw lock failed("eLocked") exception.
Definition at line 188 of file ncbimtx.cpp. References NCBI_THROW. Referenced by Lock(). |
|
|
Throw try lock failed("eTryLock") exception.
Definition at line 198 of file ncbimtx.cpp. References NCBI_THROW. Referenced by TryLock(). |
|
|
Throw uninitialized ("eUninitialized") exception.
Definition at line 183 of file ncbimtx.cpp. References eUninitialized, and NCBI_THROW. |
|
|
Throw unlock failed("eUnlocked") exception.
Definition at line 193 of file ncbimtx.cpp. References NCBI_THROW. Referenced by Unlock(). |
|
|
Try to lock.
Definition at line 234 of file ncbimtx.cpp. References CheckInitialized(), m_Handle, ThrowTryLockFailed(), and WRITE_MUTEX_EVENT. |
|
|
Release mutex with no owner or nesting checks.
Definition at line 272 of file ncbimtx.cpp. References CheckInitialized(), m_Handle, ThrowUnlockFailed(), and WRITE_MUTEX_EVENT. |
|
|
Definition at line 355 of file ncbimtx.hpp. |
|
|
Definition at line 357 of file ncbimtx.hpp. |
|
|
Definition at line 359 of file ncbimtx.hpp. |
|
|
Definition at line 354 of file ncbimtx.hpp. |
|
|
Mutex handle.
Definition at line 262 of file ncbimtx.hpp. Referenced by DestroyHandle(), InitializeHandle(), Lock(), TryLock(), and Unlock(). |
|
|
Magic flag.
Definition at line 269 of file ncbimtx.hpp. Referenced by Destroy(), InitializeDynamic(), and InitializeStatic(). |
1.4.6
Modified on Mon Dec 07 16:24:33 2009 by modify_doxy.py rev. 173732