From 49507a6f6ae42e4e9b29e0b7e996d58d6eb4c477 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Mon, 27 Mar 2017 19:47:23 +0000 Subject: 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 --- bgpd/bgp_keepalives.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bgpd/bgp_keepalives.c') 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); } -- cgit v1.2.3