diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-04-16 07:18:07 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-11-30 22:17:59 +0100 |
commit | 0ca8b79f38c697c0c159518245f3bdb217157944 (patch) | |
tree | a80c7d83626b8bf2afff8a46daebbb8ee274a10c /bgpd/bgp_keepalives.c | |
parent | bgpd: use hash table for bgp_keepalives.c (diff) | |
download | frr-0ca8b79f38c697c0c159518245f3bdb217157944.tar.xz frr-0ca8b79f38c697c0c159518245f3bdb217157944.zip |
bgpd: use new threading infra
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_keepalives.c')
-rw-r--r-- | bgpd/bgp_keepalives.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bgpd/bgp_keepalives.c b/bgpd/bgp_keepalives.c index dada5c3c2..23f3f5173 100644 --- a/bgpd/bgp_keepalives.c +++ b/bgpd/bgp_keepalives.c @@ -31,6 +31,7 @@ #include "vty.h" #include "monotime.h" #include "hash.h" +#include "frr_pthread.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_keepalives.h" @@ -273,3 +274,12 @@ void peer_keepalives_wake() } pthread_mutex_unlock(peerhash_mtx); } + +int peer_keepalives_stop(void **result) +{ + struct frr_pthread *fpt = frr_pthread_get(PTHREAD_KEEPALIVES); + bgp_keepalives_thread_run = false; + peer_keepalives_wake(); + pthread_join(fpt->thread, result); + return 0; +} |