Ejemplo n.º 1
0
 TraceGuard::TraceGuard() :function(NULL) 
 {
   parent = tlParent.get();
   depth = parent == NULL ? 0 : parent->depth + 1;
   tlParent.set(this);
   // silent
 }
Ejemplo n.º 2
0
 void LanguageHook::clearLanguageHook()
 {
   LanguageHook* lh = addonLanguageHookTls.get();
   addonLanguageHookTls.set(NULL);
   if (lh)
     lh->Release();
 }
Ejemplo n.º 3
0
  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); 
  }
Ejemplo n.º 4
0
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);
}
Ejemplo n.º 5
0
CThread* CThread::GetCurrentThread()
{
  return currentThread.get();
}
Ejemplo n.º 6
0
 LanguageHook* LanguageHook::getLanguageHook()
 {
   return threadLocalInitilialized ? addonLanguageHookTls.get() : NULL;
 }