Add names for pthreads in Integrity
Set name for pthread instead of "name too long" for easier tracking. Change-Id: Iab22cbeac01277e4dc1325399c7892de2e5bd551 Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
91d2905f43
commit
6792c42f1e
@ -720,6 +720,12 @@ void QThread::start(Priority priority)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Q_OS_INTEGRITY
|
||||
if (Q_LIKELY(objectName().isEmpty()))
|
||||
pthread_attr_setthreadname(&attr, metaObject()->className());
|
||||
else
|
||||
pthread_attr_setthreadname(&attr, objectName().toLocal8Bit());
|
||||
#endif
|
||||
pthread_t threadId;
|
||||
int code = pthread_create(&threadId, &attr, QThreadPrivate::start, this);
|
||||
if (code == EPERM) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user