Changeset 1091
- Timestamp:
- 05/02/08 11:57:48 (4 years ago)
- Files:
-
- trunk/libffado/src/libutil/PosixThread.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libutil/PosixThread.cpp
r969 r1091 79 79 bool res = true; 80 80 while (obj->fRunning && res) { 81 // debugOutput( DEBUG_LEVEL_VERBOSE, "ThreadHandler: run %p\n", obj); 81 82 res = runnable->Execute(); 82 //pthread_testcancel();83 pthread_testcancel(); 83 84 } 84 85 … … 152 153 { 153 154 if (fThread) { // If thread has been started 154 debugOutput( DEBUG_LEVEL_VERBOSE, "PosixThread::Kill %p \n", this);155 debugOutput( DEBUG_LEVEL_VERBOSE, "PosixThread::Kill %p (thread: %p)\n", this, fThread); 155 156 void* status; 156 157 pthread_cancel(fThread); 157 158 pthread_join(fThread, &status); 158 debugOutput( DEBUG_LEVEL_VERBOSE, "PosixThread::Killed %p \n", this);159 debugOutput( DEBUG_LEVEL_VERBOSE, "PosixThread::Killed %p (thread: %p)\n", this, fThread); 159 160 return 0; 160 161 } else { … … 166 167 { 167 168 if (fThread) { // If thread has been started 168 debugOutput( DEBUG_LEVEL_VERBOSE, "PosixThread::Stop %p \n", this);169 debugOutput( DEBUG_LEVEL_VERBOSE, "PosixThread::Stop %p (thread: %p)\n", this, fThread); 169 170 void* status; 170 171 fRunning = false; // Request for the thread to stop 171 172 pthread_join(fThread, &status); 172 debugOutput( DEBUG_LEVEL_VERBOSE, "PosixThread::Stopped %p \n", this);173 debugOutput( DEBUG_LEVEL_VERBOSE, "PosixThread::Stopped %p (thread: %p)\n", this, fThread); 173 174 return 0; 174 175 } else {
