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 9ae164eb83)
r14.1.x
OBATA Akio 6 months ago committed by Michele Calgaro
parent 03ef2cdd33
commit cd45e22a58
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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

Loading…
Cancel
Save