summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_keepalives.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-01-09 20:59:22 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-01-09 20:59:22 +0100
commitc80bedb83bf0e91b49b81e9d2c4bd80550712c5a (patch)
treeaed1e5b3fc56054b4a866207b7936a19ae525a8c /bgpd/bgp_keepalives.c
parentlib: Cleanup thread name setting to happen at start (diff)
downloadfrr-c80bedb83bf0e91b49b81e9d2c4bd80550712c5a.tar.xz
frr-c80bedb83bf0e91b49b81e9d2c4bd80550712c5a.zip
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 <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_keepalives.c')
-rw-r--r--bgpd/bgp_keepalives.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bgpd/bgp_keepalives.c b/bgpd/bgp_keepalives.c
index 50aad70dd..87e3ff249 100644
--- a/bgpd/bgp_keepalives.c
+++ b/bgpd/bgp_keepalives.c
@@ -181,7 +181,11 @@ void *bgp_keepalives_start(void *arg)
pthread_cond_init(peerhash_cond, &attrs);
pthread_condattr_destroy(&attrs);
- frr_pthread_set_name(fpt, NULL, "bgpd_ka");
+ /*
+ * We are not using normal FRR pthread mechanics and are
+ * not using fpt_run
+ */
+ frr_pthread_set_name(fpt);
/* initialize peer hashtable */
peerhash = hash_create_size(2048, peer_hash_key, peer_hash_cmp, NULL);