Changeset 970

Show
Ignore:
Timestamp:
03/23/08 03:42:13 (15 years ago)
Author:
ppalmers
Message:

catch problems with non-rt capable systems and the watchdog thread

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libutil/Watchdog.cpp

    r941 r970  
    171171        return false; 
    172172    } 
    173     m_CheckThread = new Util::PosixThread(m_CheckTask, m_realtime, 
    174                                           m_priority, PTHREAD_CANCEL_ASYNCHRONOUS); 
     173    m_CheckThread = new Util::PosixThread(m_CheckTask, false, 
     174                                          0, PTHREAD_CANCEL_ASYNCHRONOUS); 
    175175    if(!m_CheckThread) { 
    176176        debugFatal("No check thread\n"); 
     
    180180                 " check task: %p, thread %p...\n", 
    181181                 m_CheckTask, m_CheckThread); 
     182 
     183    // switch to realtime if necessary 
     184    if(m_realtime) { 
     185        if(m_CheckThread->AcquireRealTime(m_priority)) { 
     186            debugWarning("(%p) Could not aquire realtime priotiry for watchdog thread.\n", this); 
     187        } 
     188    } 
    182189 
    183190    // start threads