TraceGuard::TraceGuard() :function(NULL) { parent = tlParent.get(); depth = parent == NULL ? 0 : parent->depth + 1; tlParent.set(this); // silent }
void LanguageHook::clearLanguageHook() { LanguageHook* lh = addonLanguageHookTls.get(); addonLanguageHookTls.set(NULL); if (lh) lh->Release(); }
TraceGuard::TraceGuard(const char* _function) :function(_function) { parent = tlParent.get(); depth = parent == NULL ? 0 : parent->depth + 1; tlParent.set(this); CLog::Log(LOGDEBUG, "%sNEWADDON Entering %s", spaces[depth], function); }
void CThread::term_handler (int signum) { CLog::Log(LOGERROR,"thread 0x%lx (%lu) got signal %d. calling OnException and terminating thread abnormally.", (long unsigned int)pthread_self(), (long unsigned int)pthread_self(), signum); CThread* curThread = currentThread.get(); if (curThread) { curThread->m_bStop = TRUE; curThread->m_StopEvent.Set(); curThread->OnException(); if( curThread->IsAutoDelete() ) delete curThread; } pthread_exit(NULL); }
CThread* CThread::GetCurrentThread() { return currentThread.get(); }
LanguageHook* LanguageHook::getLanguageHook() { return threadLocalInitilialized ? addonLanguageHookTls.get() : NULL; }