![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cThreadLock.h>
Public Member Functions | |
cThreadId (THREADID_t nThreadId=k_NULL) noexcept | |
THREADID_t | GetThreadId () const noexcept |
THREADID_t | get_HashCode () const noexcept |
bool | isCurrentThread () const noexcept |
bool | isValidId () const noexcept |
void | InitCurrentId () noexcept |
Static Public Member Functions | |
static THREADID_t | GetCurrentId () noexcept |
static bool | IsValidId (THREADID_t id) noexcept |
static bool | IsEqualId (THREADID_t a, THREADID_t b) noexcept |
static void | SleepCurrent (TIMESYS_t uMs=cTimeSys::k_FREQ) noexcept |
Static Public Attributes | |
static const THREADID_t | k_NULL = 0 |
Not a valid thread Id. More... | |
Protected Attributes | |
THREADID_t | m_dwThreadId |
unique thread id. i.e. stack base pointer. (Use the MFC name) More... | |
Friends | |
class | cThreadLockTests |
base static namespace for common thread functions. ASSUME all code wants defined(_MT) ?
|
inlinenoexcept |
|
inlinenoexcept |
Get a unique hash code for the thread.
|
inlinestaticnoexcept |
Get the callers ThreadId.
|
inlinenoexcept |
Similar to the MFC CWorkerThread call. linux use pthread. don't use the old fashioned gettid(). Also (m_hThread == THREADID_t)
|
inlinenoexcept |
set equal to the current thread id.
|
inlinenoexcept |
< Is this the current running thread?
|
inlinestaticnoexcept |
Are these id's the same thread? In Linux this might be similar to _WIN32 HANDLE.
|
inlinenoexcept |
|
inlinestaticnoexcept |
Is this thread valid? the system thread is considered valid.
|
inlinestaticnoexcept |
Sleep current thread for n Milliseconds. cTimeSys::k_FREQ Let the OS schedule something else during this time.
|
friend |
|
static |
Not a valid thread Id.
|
protected |
unique thread id. i.e. stack base pointer. (Use the MFC name)