Intel® Trace Collector 9.1 Update 2 User and Reference Guide
int VT_registerthread(int thindex)
Registers a new thread with Intel® Trace Collector under the given number.
Threads are numbered starting from 0, which is always the thread that has called VT_initialize() or MPI_Init(). The call to VT_registerthread() is optional, as the thread that uses Intel® Trace Collector without having called VT_registerthread() is automatically assigned the lowest free index. If a thread terminates, then its index becomes available again and might be reused for another thread.
Calling VT_registerthread() when the thread has been assigned an index already is an error, unless the argument of VT_registerthread() is equal to this index. The thread is not (re-)registered in case of an error.
VTREGISTERTHREAD(thindex, ierr)
thindex | thread number, only used if >= 0 |
Returns error codes:
VT_ERR_BADINDEX - thread index is currently assigned to another thread
VT_ERR_BADARG - thread has been assigned a different index already
VT_ERR_NOTINITIALIZED - Intel® Trace Collector has not been initialized yet