diff options
author | OBATA Akio <obache@wizdas.com> | 2024-05-23 17:43:35 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-05-23 18:04:54 +0900 |
commit | cd45e22a58c274f0ca089f722d9984bb2ae446c6 (patch) | |
tree | 7cf03a45da1f489a21edb8bedbc0174f87bb33e2 | |
parent | 03ef2cdd33b6d39509adee03e5e1a757b0a69cc7 (diff) | |
download | tqt3-cd45e22a58c274f0ca089f722d9984bb2ae446c6.tar.gz tqt3-cd45e22a58c274f0ca089f722d9984bb2ae446c6.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>
(cherry picked from commit 9ae164eb837f7a9135fecca24b8c8e6528aef1b7)
-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 6a6f81b7f..be67e002d 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 |