Make sure we are always cleaning init'ing and cleaning up pthread infra.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
assert(!bgp_pth_io);
assert(!bgp_pth_ka);
- frr_pthread_init();
-
struct frr_pthread_attr io = {
.start = frr_pthread_attr_default.start,
.stop = frr_pthread_attr_default.stop,
void bgp_pthreads_finish(void)
{
frr_pthread_stop_all();
- frr_pthread_finish();
}
void bgp_init(unsigned short instance)
#include "northbound_db.h"
#include "debug.h"
#include "frrcu.h"
+#include "frr_pthread.h"
DEFINE_HOOK(frr_late_init, (struct thread_master * tm), (tm))
DEFINE_KOOH(frr_early_fini, (), ())
memory_init();
log_filter_cmd_init();
+ frr_pthread_init();
+
log_ref_init();
log_ref_vty_init();
lib_error_init();
db_close();
#endif
log_ref_fini();
+ frr_pthread_finish();
zprivs_terminate(di->privs);
/* signal_init -> nothing needed */
thread_master_free(master);
#include "vrf.h"
#include "libfrr.h"
#include "routemap.h"
-#include "frr_pthread.h"
#include "zebra/zebra_router.h"
#include "zebra/zebra_errors.h"
zrouter.master = frr_init();
- /* Initialize pthread library */
- frr_pthread_init();
-
/* Zebra related initialize. */
zebra_router_init();
zserv_init();