Changeset 940
- Timestamp:
- 03/12/08 07:05:53 (13 years ago)
- Files:
-
- trunk/libffado/src/libieee1394/CycleTimerHelper.cpp (modified) (2 diffs)
- trunk/libffado/src/libieee1394/ieee1394service.cpp (modified) (6 diffs)
- trunk/libffado/src/libieee1394/ieee1394service.h (modified) (3 diffs)
- trunk/libffado/src/libieee1394/IsoHandlerManager.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libieee1394/CycleTimerHelper.cpp
r932 r940 28 28 #include "libutil/PosixThread.h" 29 29 #include "libutil/Atomic.h" 30 #include "libutil/Watchdog.h" 30 31 31 32 #define DLL_PI (3.141592653589793238) … … 135 136 return false; 136 137 } 138 // register the thread with the RT watchdog 139 Util::Watchdog *watchdog = m_Parent.getWatchdog(); 140 if(watchdog) { 141 if(!watchdog->registerThread(m_Thread)) { 142 debugWarning("could not register update thread with watchdog\n"); 143 } 144 } else { 145 debugWarning("could not find valid watchdog\n"); 146 } 147 137 148 if (m_Thread->Start() != 0) { 138 149 debugFatal("Could not start update thread\n"); trunk/libffado/src/libieee1394/ieee1394service.cpp
r937 r940 35 35 36 36 #include "libutil/SystemTimeSource.h" 37 #include "libutil/Watchdog.h" 37 38 38 39 #include <errno.h> … … 56 57 , m_have_new_ctr_read ( false ) 57 58 , m_pTimeSource ( new Util::SystemTimeSource() ) 59 , m_pWatchdog ( new Util::Watchdog() ) 58 60 { 59 61 pthread_mutex_init( &m_mutex, 0 ); … … 82 84 , m_have_new_ctr_read ( false ) 83 85 , m_pTimeSource ( new Util::SystemTimeSource() ) 86 , m_pWatchdog ( new Util::Watchdog() ) 84 87 { 85 88 pthread_mutex_init( &m_mutex, 0 ); … … 114 117 115 118 delete m_pTimeSource; 119 delete m_pWatchdog; 116 120 if ( m_handle ) { 117 121 raw1394_destroy_handle( m_handle ); … … 152 156 if (port + 1 > nb_ports) { 153 157 debugFatal("Requested port (%d) out of range (# ports: %d)\n", port, nb_ports); 158 } 159 160 if(!m_pWatchdog) { 161 debugError("No valid RT watchdog found.\n"); 162 return false; 163 } 164 if(!m_pWatchdog->start()) { 165 debugError("Could not start RT watchdog.\n"); 166 return false; 154 167 } 155 168 … … 1091 1104 if (m_pIsoManager) m_pIsoManager->setVerboseLevel(l); 1092 1105 if (m_pCTRHelper) m_pCTRHelper->setVerboseLevel(l); 1106 if (m_pWatchdog) m_pWatchdog->setVerboseLevel(l); 1093 1107 setDebugLevel(l); 1094 1108 debugOutput( DEBUG_LEVEL_VERBOSE, "Setting verbose level to %d...\n", l ); trunk/libffado/src/libieee1394/ieee1394service.h
r932 r940 45 45 namespace Util { 46 46 class TimeSource; 47 class Watchdog; 47 48 } 48 49 … … 55 56 bool initialize( int port ); 56 57 bool setThreadParameters(bool rt, int priority); 58 Util::Watchdog *getWatchdog() {return m_pWatchdog;}; 59 57 60 /** 58 61 * @brief get number of ports (firewire adapters) in this machine … … 331 334 Util::TimeSource* m_pTimeSource; 332 335 336 // the RT watchdog 337 Util::Watchdog* m_pWatchdog; 338 333 339 typedef std::vector< Util::Functor* > reset_handler_vec_t; 334 340 reset_handler_vec_t m_busResetHandlers; trunk/libffado/src/libieee1394/IsoHandlerManager.cpp
r938 r940 29 29 30 30 #include "libutil/Atomic.h" 31 32 31 #include "libutil/PosixThread.h" 33 34 32 #include "libutil/SystemTimeSource.h" 33 #include "libutil/Watchdog.h" 35 34 36 35 #include <assert.h> … … 335 334 return false; 336 335 } 336 // register the thread with the RT watchdog 337 Util::Watchdog *watchdog = m_service.getWatchdog(); 338 if(watchdog) { 339 if(!watchdog->registerThread(m_IsoThread)) { 340 debugWarning("could not register iso thread with watchdog\n"); 341 } 342 } else { 343 debugWarning("could not find valid watchdog\n"); 344 } 345 337 346 if (m_IsoThread->Start() != 0) { 338 347 debugFatal("Could not start ISO thread\n");