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>
pull/152/head
OBATA Akio 6 months ago
parent 168dd9b0c5
commit 9ae164eb83

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