From 99b03be63de497bebbc26fcb2a564f1938493ef0 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 3 Nov 2013 01:00:57 -0500 Subject: Add threading debug spew when QT_DEBUG is set --- src/kernel/qthread_unix.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/kernel/qthread_unix.cpp') diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp index a48468b..530d401 100644 --- a/src/kernel/qthread_unix.cpp +++ b/src/kernel/qthread_unix.cpp @@ -105,6 +105,7 @@ void QThreadInstance::init(unsigned int stackSize) finished = FALSE; running = FALSE; orphan = FALSE; + disableThreadPostedEvents = FALSE; pthread_cond_init(&thread_done, NULL); thread_id = 0; @@ -130,6 +131,9 @@ void *QThreadInstance::start( void *_arg ) ((QThreadInstance*)arg[1])->thread_id = pthread_self(); #endif // QT_USE_GLIBMAINLOOP +#ifdef QT_DEBUG + qDebug("QThreadInstance::start: Setting thread storage to %p\n\r", (QThread *) arg[0]); +#endif // QT_DEBUG setCurrentThread( (QThread *) arg[0] ); pthread_cleanup_push( QThreadInstance::finish, arg[1] ); @@ -152,6 +156,8 @@ void QThreadInstance::finish( void * ) return; } + qDebug("QThreadInstance::finish: In QThreadInstance::finish for thread %p\n\r", (QThread*)d->args[0]); + QApplication::threadTerminationHandler((QThread*)d->args[0]); QMutexLocker locker( d->mutex() ); @@ -510,7 +516,7 @@ bool QThread::wait( unsigned long time ) \sa CleanupType */ -QThread::CleanupType QThread::cleanupType() { +QThread::CleanupType QThread::cleanupType() const { return (QThread::CleanupType)d->cleanupType; } -- cgit v1.2.3