summaryrefslogtreecommitdiffstats
path: root/src/kernel/qthread_unix.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-12-08 15:17:51 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-12-14 17:51:59 +0900
commit3a477fb70884668d163f6631a73c8ab894928bcc (patch)
tree0ac0327df978cf22b7a1f495f0649591bb39ed2a /src/kernel/qthread_unix.cpp
parente4085a83c143eb366d0364596297b322476cc652 (diff)
downloadtqt-3a477fb70884668d163f6631a73c8ab894928bcc.tar.gz
tqt-3a477fb70884668d163f6631a73c8ab894928bcc.zip
Replace TRUE/FALSE with boolean values true/false - part 8r14.1.x
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 7d612f7c91d55501276a385a30dbadb121e7bd9f)
Diffstat (limited to 'src/kernel/qthread_unix.cpp')
-rw-r--r--src/kernel/qthread_unix.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp
index 723ca8bcf..44bfd5b99 100644
--- a/src/kernel/qthread_unix.cpp
+++ b/src/kernel/qthread_unix.cpp
@@ -102,10 +102,10 @@ void TQThreadInstance::init(unsigned int stackSize)
stacksize = stackSize;
args[0] = args[1] = 0;
thread_storage = 0;
- finished = FALSE;
- running = FALSE;
- orphan = FALSE;
- disableThreadPostedEvents = FALSE;
+ finished = false;
+ running = false;
+ orphan = false;
+ disableThreadPostedEvents = false;
pthread_cond_init(&thread_done, nullptr);
thread_id = 0;
@@ -142,7 +142,7 @@ void *TQThreadInstance::start( void *_arg )
( (TQThread *) arg[0] )->run();
- pthread_cleanup_pop( TRUE );
+ pthread_cleanup_pop( true );
return 0;
}
@@ -164,8 +164,8 @@ void TQThreadInstance::finish( void * )
TQApplication::threadTerminationHandler((TQThread*)d->args[0]);
TQMutexLocker locker( d->mutex() );
- d->running = FALSE;
- d->finished = TRUE;
+ d->running = false;
+ d->finished = true;
d->args[0] = d->args[1] = 0;
@@ -220,9 +220,9 @@ TQt::HANDLE TQThread::currentThread()
void TQThread::initialize()
{
if ( ! tqt_global_mutexpool )
- tqt_global_mutexpool = new TQMutexPool( TRUE, 73 );
+ tqt_global_mutexpool = new TQMutexPool( true, 73 );
if ( ! qt_thread_mutexpool )
- qt_thread_mutexpool = new TQMutexPool( FALSE, 127 );
+ qt_thread_mutexpool = new TQMutexPool( false, 127 );
}
/*! \internal
@@ -331,8 +331,8 @@ void TQThread::start(Priority priority)
pthread_cond_wait(&d->thread_done, &locker.mutex()->d->handle);
}
- d->running = TRUE;
- d->finished = FALSE;
+ d->running = true;
+ d->finished = false;
int ret;
pthread_attr_t attr;
@@ -411,8 +411,8 @@ void TQThread::start(Priority priority)
// we failed to set the stacksize, and as the documentation states,
// the thread will fail to run...
- d->running = FALSE;
- d->finished = FALSE;
+ d->running = false;
+ d->finished = false;
return;
}
}
@@ -454,8 +454,8 @@ void TQThread::start(Priority priority)
tqWarning( "TQThread::start: thread creation error: %s", strerror( ret ) );
#endif // QT_CHECK_STATE
- d->running = FALSE;
- d->finished = FALSE;
+ d->running = false;
+ d->finished = false;
d->args[0] = d->args[1] = 0;
}
}
@@ -472,11 +472,11 @@ void TQThread::start()
\list
\i The thread associated with this TQThread object has finished
execution (i.e. when it returns from \l{run()}). This function
- will return TRUE if the thread has finished. It also returns
- TRUE if the thread has not been started yet.
+ will return true if the thread has finished. It also returns
+ true if the thread has not been started yet.
\i \a time milliseconds has elapsed. If \a time is ULONG_MAX (the
default), then the wait will never timeout (the thread must
- return from \l{run()}). This function will return FALSE if the
+ return from \l{run()}). This function will return false if the
wait timed out.
\endlist
@@ -491,11 +491,11 @@ bool TQThread::wait( unsigned long time )
tqWarning( "TQThread::wait: thread tried to wait on itself" );
#endif // QT_CHECK_STATE
- return FALSE;
+ return false;
}
if ( d->finished || ! d->running ) {
- return TRUE;
+ return true;
}
int ret;