From c80bedb83bf0e91b49b81e9d2c4bd80550712c5a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 9 Jan 2019 14:59:22 -0500 Subject: lib, bgpd: Convert frr_pthread_set_name to only cause it to set os name of the thread The current invocation of frr_pthread_set_name was causing it reset the os_name. There is no need for this, we now always create the pthread appropriately to have both name and os_name. So convert this function to a simple call through of the pthread call now. Before(any of these changes): sharpd@robot ~/frr1> ps -L -p 16895 PID LWP TTY TIME CMD 16895 16895 ? 00:01:39 bgpd 16895 16896 ? 00:00:54 16895 16897 ? 00:00:07 bgpd_ka After: sharpd@donna ~/frr1> ps -L -p 1752 PID LWP TTY TIME CMD 1752 1752 ? 00:00:00 bgpd 1752 1753 ? 00:00:00 bgpd_io 1752 1754 ? 00:00:00 bgpd_ka Signed-off-by: Donald Sharp --- lib/frr_pthread.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/frr_pthread.h') diff --git a/lib/frr_pthread.h b/lib/frr_pthread.h index b9e60511d5..e6b3f031b3 100644 --- a/lib/frr_pthread.h +++ b/lib/frr_pthread.h @@ -133,16 +133,13 @@ struct frr_pthread *frr_pthread_new(struct frr_pthread_attr *attr, const char *name, const char *os_name); /* - * Changes the name of the frr_pthread. + * Changes the name of the frr_pthread as reported by the operating + * system. * * @param fpt - the frr_pthread to operate on - * @param name - Human-readable name - * @param os_name - 16 characters thread name , including the null - * terminator ('\0') to set in os. * @return - on success returns 0 otherwise nonzero error number. */ -int frr_pthread_set_name(struct frr_pthread *fpt, const char *name, - const char *os_name); +int frr_pthread_set_name(struct frr_pthread *fpt); /* * Destroys an frr_pthread. -- cgit v1.2.3