diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-04-16 05:18:07 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-11-30 16:17:59 -0500 |
| commit | 0ca8b79f38c697c0c159518245f3bdb217157944 (patch) | |
| tree | a80c7d83626b8bf2afff8a46daebbb8ee274a10c /bgpd/bgp_keepalives.c | |
| parent | bd8b71e405f24a2e94c0d8290b1f4692c9870b22 (diff) | |
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 dada5c3c26..23f3f51732 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; +} |
