diff options
author | OBATA Akio <obache@wizdas.com> | 2024-05-23 17:43:35 +0900 |
---|---|---|
committer | OBATA Akio <obache@wizdas.com> | 2024-05-23 17:43:35 +0900 |
commit | 9ae164eb837f7a9135fecca24b8c8e6528aef1b7 (patch) | |
tree | 2e83cf8d7dc73189bf712f346a9ac90503f903b8 | |
parent | 168dd9b0c580f8b11364fd6f9c76d7bec419681c (diff) | |
download | tqt3-9ae164eb837f7a9135fecca24b8c8e6528aef1b7.tar.gz tqt3-9ae164eb837f7a9135fecca24b8c8e6528aef1b7.zip |
Fix to compare thread_id with `pthread_equal()`
`pthread_t` is an opaque type, should not be compared with `==`.
Signed-off-by: OBATA Akio <obache@wizdas.com>
-rw-r--r-- | src/kernel/qthread_unix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp index 6a6f81b7..be67e002 100644 --- a/src/kernel/qthread_unix.cpp +++ b/src/kernel/qthread_unix.cpp @@ -483,7 +483,7 @@ bool TQThread::wait( unsigned long time ) { TQMutexLocker locker( d->mutex() ); - if ( d->thread_id == pthread_self() ) { + if ( pthread_equal( d->thread_id, pthread_self() ) ) { #ifdef QT_CHECK_STATE tqWarning( "TQThread::wait: thread tried to wait on itself" ); #endif // QT_CHECK_STATE |