diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-03-27 19:47:23 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-11-30 16:17:58 -0500 |
| commit | 49507a6f6ae42e4e9b29e0b7e996d58d6eb4c477 (patch) | |
| tree | d376648d5a82b7a14e7c337643c8af7271137405 /bgpd/bgp_keepalives.c | |
| parent | 2d4ee77490a1a0b93b5e6945af2210bb0836baa1 (diff) | |
bgpd: remove unused `struct thread` from peer
* Remove t_write
* Remove t_keepalive
These have been replaced by pthreads and are no longer needed. Since
some code looks at these values to determine if the threads are
scheduled, also add a new bitfield to store the same information.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_keepalives.c')
| -rw-r--r-- | bgpd/bgp_keepalives.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_keepalives.c b/bgpd/bgp_keepalives.c index d142e31af1..4944e3ea23 100644 --- a/bgpd/bgp_keepalives.c +++ b/bgpd/bgp_keepalives.c @@ -215,6 +215,7 @@ void peer_keepalives_on(struct peer *peer) pkat = pkat_new(peer); listnode_add(peerlist, pkat); peer_lock(peer); + SET_FLAG(peer->thread_flags, PEER_THREAD_KEEPALIVES_ON); } pthread_mutex_unlock(&peerlist_mtx); peer_keepalives_wake(); @@ -233,6 +234,8 @@ void peer_keepalives_off(struct peer *peer) list_delete_node(peerlist, ln); peer_unlock(peer); } + + UNSET_FLAG(peer->thread_flags, PEER_THREAD_KEEPALIVES_ON); } pthread_mutex_unlock(&peerlist_mtx); } |
