]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_main.c
bgpd: dynamically allocate synchronization primitives
authorQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 29 Mar 2017 19:16:28 +0000 (19:16 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 30 Nov 2017 21:17:58 +0000 (16:17 -0500)
commit419dfe6a7049c0ee7f469cc10724ea110bef3c9c
tree93c09b8621dcea6a3643738a2a2d01688b584107
parent49507a6f6ae42e4e9b29e0b7e996d58d6eb4c477
bgpd: dynamically allocate synchronization primitives

Changes all synchronization primitives to be dynamically allocated. This
should help catch any subtle errors in pthread lifecycles.

This change also pre-initializes synchronization primitives before
threads begin to run, eliminating a potential race condition that
probably would have caused a segfault on startup on a very fast box.

Also changes mutex and condition variable allocations to use
MTYPE_PTHREAD and updates tests to do the proper initializations.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
bgpd/bgp_keepalives.c
bgpd/bgp_keepalives.h
bgpd/bgp_main.c
bgpd/bgp_packet.c
bgpd/bgp_packet.h
bgpd/bgpd.c
bgpd/bgpd.h
tests/bgpd/test_aspath.c
tests/bgpd/test_capability.c