Thread Names in the UI
When set, thread names are displayed in both the title bar and the Processes & Threads view, when Thread Name is selected in the Group by pane:
This program sets these thread names:
pthread_mutex_lock(&name_mutex);
int rc;
if (!first_in)
{
first_in = true;
rc = pthread_setname_np(thread, "Primary");
}
else
rc = pthread_setname_np(thread, "Secondary");
The first thread to enter a function is named “Primary”, and all subsequent threads are called “Secondary.”
Also relevant to thread names are three other properties, the
systid (the target system thread ID) and the
utid / ktid (“thread user ID” / “thread kernel ID”). You can display these in the Processes & Threads view by selecting them in the
Group by pane: