summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/threadutil.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/threadutil.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/threadutil.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/threadutil.cpp b/noncore/multimedia/opieplayer2/threadutil.cpp
index fb951b4..d8b8abe 100644
--- a/noncore/multimedia/opieplayer2/threadutil.cpp
+++ b/noncore/multimedia/opieplayer2/threadutil.cpp
@@ -178,34 +178,34 @@ Thread::Thread()
178 178
179Thread::~Thread() 179Thread::~Thread()
180{ 180{
181 assert( d->isRunning == false ); 181 assert( d->isRunning == false );
182 delete d; 182 delete d;
183} 183}
184 184
185void Thread::start() 185void Thread::start()
186{ 186{
187 AutoLock lock( d->guard ); 187 AutoLock lock( d->guard );
188 188
189 if ( d->isRunning ) { 189 if ( d->isRunning ) {
190 qDebug( "ThreadUtil::Thread::start() called for running thread." ); 190 odebug << "ThreadUtil::Thread::start() called for running thread." << oendl;
191 return; 191 return;
192 } 192 }
193 193
194 pthread_attr_t attributes; 194 pthread_attr_t attributes;
195 pthread_attr_init( &attributes ); 195 pthread_attr_init( &attributes );
196 pthread_attr_setscope( &attributes, PTHREAD_SCOPE_SYSTEM ); 196 pthread_attr_setscope( &attributes, PTHREAD_SCOPE_SYSTEM );
197 int err = pthread_create( &d->self, &attributes, start_thread, ( void* )d ); 197 int err = pthread_create( &d->self, &attributes, start_thread, ( void* )d );
198 if ( err != 0 ) { 198 if ( err != 0 ) {
199 qDebug( "ThreadUtil::Thread::start() : can't create thread: %s", strerror( err ) ); 199 odebug << "ThreadUtil::Thread::start() : can't create thread: " << strerror( err ) << "" << oendl;
200 pthread_attr_destroy( &attributes ); 200 pthread_attr_destroy( &attributes );
201 return; 201 return;
202 } 202 }
203 pthread_attr_destroy( &attributes ); 203 pthread_attr_destroy( &attributes );
204} 204}
205 205
206void Thread::terminate() 206void Thread::terminate()
207{ 207{
208 AutoLock lock( d->guard ); 208 AutoLock lock( d->guard );
209 if ( !d->isRunning ) 209 if ( !d->isRunning )
210 return; 210 return;
211 211
@@ -275,25 +275,25 @@ ChannelMessage::ChannelMessage( int type )
275} 275}
276 276
277ChannelMessage::~ChannelMessage() 277ChannelMessage::~ChannelMessage()
278{ 278{
279 if ( m_guard.isLocked() ) 279 if ( m_guard.isLocked() )
280 m_guard.unlock(); 280 m_guard.unlock();
281} 281}
282 282
283void ChannelMessage::reply() 283void ChannelMessage::reply()
284{ 284{
285 if ( !m_isCall ) 285 if ( !m_isCall )
286 { 286 {
287 qDebug( "ChannelMessage::reply() - can't reply oneway message!" ); 287 odebug << "ChannelMessage::reply() - can't reply oneway message!" << oendl;
288 return; 288 return;
289 } 289 }
290 290
291 if ( m_inEventHandler ) 291 if ( m_inEventHandler )
292 { 292 {
293 m_replied = true; 293 m_replied = true;
294 return; 294 return;
295 } 295 }
296 296
297 m_condition.wakeOne(); 297 m_condition.wakeOne();
298 m_guard.unlock(); 298 m_guard.unlock();
299} 299}