![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cThreadLock.h>
Public Member Functions | |
| cThreadLockMutex (const cThreadLockMutex &a) noexcept | |
| cThreadLockMutex (const FILECHAR_t *pszMutexName=nullptr, bool bInitialOwner=false) noexcept | |
| ~cThreadLockMutex () noexcept | |
| bool | Lock () |
| bool | Unlock () |
| bool | LockTry (TIMESYSD_t dwDelayMS=0) |
Public Member Functions inherited from Gray::cThreadLockBase | |
| cThreadLockBase () noexcept | |
| bool | isLocked () const noexcept |
| THREADID_t | get_ThreadLockOwner () const |
| bool | isThreadLockedByCurrent () const noexcept |
Public Attributes | |
| pthread_mutex_t | m_Mutex |
Static Public Attributes | |
| static const pthread_mutex_t | k_MutexInit |
Protected Member Functions | |
| void | InitLockMutex (const FILECHAR_t *pszMutexName, bool bInitialOwner) noexcept |
| void | LockInternal () |
Protected Member Functions inherited from Gray::cThreadLockBase | |
| THREADID_t | __DECL_ALIGN (_SIZEOF_THREADID) m_nLockThreadID |
| The thread that has the lock. cThreadId:k_NULL is not locked. More... | |
Protected Member Functions inherited from Gray::cLockableBase | |
| cLockableBase () noexcept | |
| ~cLockableBase () | |
| LONG | get_LockCount () const |
| bool | isLocked () const |
| void | IncLockCount () |
| LONG | DecLockCount () |
| void | Lock () |
| LONG | Unlock () |
Protected Member Functions inherited from Gray::cNonCopyable | |
| cNonCopyable () noexcept | |
| Force the use of Factory creation via protected constructor. More... | |
| ~cNonCopyable () noexcept | |
Protected Attributes | |
| bool | m_bInitialOwner |
| I also lock this myself. More... | |
Base class for data structure that may be locked for multi threaded/process access. These are expensive size wise but fast. lock something and wait for it to be freed.
|
inlinenoexcept |
Copy constructor should never actually be used. but if it is just make a new copy that is not locked! DUMMY = pretend we copied stuff.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineprotectednoexcept |
Create a system mutex.
|
inline |
code to lock a thread. This will wait forever for the resource to be free !
|
inlineprotected |
i was able to acquire this Mutex. some other way like WaitForMultipleObjects() ?
|
inline |
Try to lock the mutex. give up after a certain amount of time if it is locked by another thread. dwDelayMS = amount of time to wait. 0 = don't wait
|
inline |
|
static |
|
protected |
I also lock this myself.
| pthread_mutex_t Gray::cThreadLockMutex::m_Mutex |