This patch supports set init threads name which is helpful for
debugging.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
return -1;
pthread_create(&t_old, NULL, socket_listener, &v1_socket);
pthread_setaffinity_np(t_old, sizeof(*thread_cpuset), thread_cpuset);
return -1;
pthread_create(&t_old, NULL, socket_listener, &v1_socket);
pthread_setaffinity_np(t_old, sizeof(*thread_cpuset), thread_cpuset);
+ pthread_setname_np(t_old, "telemetry-v1");
TMTY_LOG(DEBUG, "Legacy telemetry socket initialized ok\n");
return 0;
}
TMTY_LOG(DEBUG, "Legacy telemetry socket initialized ok\n");
return 0;
}
return -1;
pthread_create(&t_new, NULL, socket_listener, &v2_socket);
pthread_setaffinity_np(t_new, sizeof(*thread_cpuset), thread_cpuset);
return -1;
pthread_create(&t_new, NULL, socket_listener, &v2_socket);
pthread_setaffinity_np(t_new, sizeof(*thread_cpuset), thread_cpuset);
+ pthread_setname_np(t_new, "telemetry-v2");
atexit(unlink_sockets);
return 0;
atexit(unlink_sockets);
return 0;