Ejemplo n.º 1
0
CTextHandler::CTextHandler()
{
    m_pbBuffer = NULL;
    m_pIndex   = NULL;
    m_BufferSize = 0;
    m_IndexCount = 0;
    m_MaxIndexCount = 8000;
    m_Key = (UInt32)ReadTimeStampCounter();
}
Ejemplo n.º 2
0
CText::CText()
{
    m_pbBuffer = NULL;
    m_pIndex   = NULL;
    m_dwBufferSize = 0;
    m_dwIndexCount = 0;
    m_dwMaxIndexCount = 80000;
    m_dwKey = (DWORD)ReadTimeStampCounter();
    m_hHeap = GetProcessHeap();
}
Ejemplo n.º 3
0
static void __cdecl
ThreadDebug__LogEntry(const char* function, void* c, void* m, void* t)
{
    if (function != LockMutex && function != UnlockMutex)
    {
        const unsigned Skip = 0; /* tuned for the scenario to debug */
        unsigned Counter = (unsigned)InterlockedIncrement(&ThreadDebug__LogCounter) - 1;
        if (Counter > Skip)
        {
            ThreadDebug__LogEntry_t* entry = &ThreadDebug__Log[(Counter - Skip) % NUMBER_OF(ThreadDebug__Log)];
            entry->tm = (unsigned)ReadTimeStampCounter();
            entry->tid = GetCurrentThreadId();
            entry->f = function;
            entry->c = c;
            entry->m = m;
            entry->t = t;
        }
    }
}