summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-03-07 20:14:41 +0100
committerDonald Sharp <sharpd@nvidia.com>2023-03-24 13:32:17 +0100
commitcd9d0537411d0a74cd19ae36f6d3716c8ccbb4c1 (patch)
treef97009b8971d71b4c05cbc0d00b98608efd40e44
parent*: Convert thread_master_XXX functions to event_master_XXX (diff)
downloadfrr-cd9d0537411d0a74cd19ae36f6d3716c8ccbb4c1.tar.xz
frr-cd9d0537411d0a74cd19ae36f6d3716c8ccbb4c1.zip
*: Convert `struct event_master` to `struct event_loop`
Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--babeld/babel_main.c2
-rw-r--r--babeld/babel_main.h2
-rw-r--r--bfdd/bfd.h2
-rw-r--r--bfdd/bfdd.c2
-rw-r--r--bgpd/bgp_bfd.c2
-rw-r--r--bgpd/bgp_bfd.h2
-rw-r--r--bgpd/bgp_bmp.c2
-rw-r--r--bgpd/bgp_labelpool.c2
-rw-r--r--bgpd/bgp_labelpool.h2
-rw-r--r--bgpd/bgp_rpki.c2
-rw-r--r--bgpd/bgp_snmp.c2
-rw-r--r--bgpd/bgp_snmp_bgp4.c2
-rw-r--r--bgpd/bgp_snmp_bgp4.h2
-rw-r--r--bgpd/bgp_snmp_bgp4v2.c2
-rw-r--r--bgpd/bgp_snmp_bgp4v2.h2
-rw-r--r--bgpd/bgp_zebra.c2
-rw-r--r--bgpd/bgp_zebra.h3
-rw-r--r--bgpd/bgpd.c2
-rw-r--r--bgpd/bgpd.h4
-rw-r--r--bgpd/rfapi/rfapi.h2
-rw-r--r--bgpd/rfapi/rfapi_backend.h2
-rw-r--r--bgpd/rfapi/vnc_zebra.c2
-rw-r--r--bgpd/rfp-example/librfp/rfp_example.c4
-rw-r--r--doc/developer/modules.rst2
-rw-r--r--doc/developer/process-architecture.rst4
-rw-r--r--eigrpd/eigrp_main.c2
-rw-r--r--eigrpd/eigrp_zebra.c2
-rw-r--r--eigrpd/eigrpd.h4
-rw-r--r--isisd/isis_bfd.c2
-rw-r--r--isisd/isis_bfd.h4
-rw-r--r--isisd/isis_main.c2
-rw-r--r--isisd/isis_snmp.c2
-rw-r--r--isisd/isis_zebra.c2
-rw-r--r--isisd/isis_zebra.h2
-rw-r--r--isisd/isisd.c2
-rw-r--r--isisd/isisd.h6
-rw-r--r--ldpd/ldp_snmp.c4
-rw-r--r--ldpd/ldp_zebra.c2
-rw-r--r--ldpd/ldpd.c4
-rw-r--r--ldpd/ldpd.h6
-rw-r--r--lib/agentx.c4
-rw-r--r--lib/bfd.c4
-rw-r--r--lib/bfd.h4
-rw-r--r--lib/event.c91
-rw-r--r--lib/event.h32
-rw-r--r--lib/frr_pthread.h2
-rw-r--r--lib/frr_zmq.c6
-rw-r--r--lib/frr_zmq.h4
-rw-r--r--lib/grammar_sandbox_main.c2
-rw-r--r--lib/libfrr.c14
-rw-r--r--lib/libfrr.h12
-rw-r--r--lib/libfrr_trace.h2
-rw-r--r--lib/mgmt_be_client.c4
-rw-r--r--lib/mgmt_be_client.h2
-rw-r--r--lib/mgmt_fe_client.c4
-rw-r--r--lib/mgmt_fe_client.h2
-rw-r--r--lib/northbound.c2
-rw-r--r--lib/northbound.h2
-rw-r--r--lib/northbound_cli.c4
-rw-r--r--lib/northbound_cli.h2
-rw-r--r--lib/northbound_confd.c4
-rw-r--r--lib/northbound_grpc.cpp4
-rw-r--r--lib/northbound_sysrepo.c6
-rw-r--r--lib/pullwr.c4
-rw-r--r--lib/pullwr.h2
-rw-r--r--lib/resolver.c4
-rw-r--r--lib/resolver.h2
-rw-r--r--lib/sigevent.c3
-rw-r--r--lib/sigevent.h4
-rw-r--r--lib/smux.h2
-rw-r--r--lib/spf_backoff.c4
-rw-r--r--lib/spf_backoff.h4
-rw-r--r--lib/systemd.c4
-rw-r--r--lib/systemd.h4
-rw-r--r--lib/vty.c4
-rw-r--r--lib/vty.h2
-rw-r--r--lib/wheel.c2
-rw-r--r--lib/wheel.h4
-rw-r--r--lib/workqueue.c3
-rw-r--r--lib/workqueue.h4
-rw-r--r--lib/zclient.c2
-rw-r--r--lib/zclient.h4
-rw-r--r--lib/zlog_5424.h4
-rw-r--r--lib/zlog_5424_cli.c6
-rw-r--r--mgmtd/mgmt.c2
-rw-r--r--mgmtd/mgmt.h5
-rw-r--r--mgmtd/mgmt_be_adapter.c4
-rw-r--r--mgmtd/mgmt_be_adapter.h2
-rw-r--r--mgmtd/mgmt_be_server.c4
-rw-r--r--mgmtd/mgmt_be_server.h2
-rw-r--r--mgmtd/mgmt_fe_adapter.c4
-rw-r--r--mgmtd/mgmt_fe_adapter.h3
-rw-r--r--mgmtd/mgmt_fe_server.c4
-rw-r--r--mgmtd/mgmt_fe_server.h2
-rw-r--r--mgmtd/mgmt_txn.c4
-rw-r--r--mgmtd/mgmt_txn.h2
-rw-r--r--nhrpd/nhrp_main.c2
-rw-r--r--nhrpd/nhrpd.h2
-rw-r--r--ospf6d/ospf6_main.c2
-rw-r--r--ospf6d/ospf6_snmp.c2
-rw-r--r--ospf6d/ospf6_top.c2
-rw-r--r--ospf6d/ospf6_top.h4
-rw-r--r--ospf6d/ospf6_zebra.c2
-rw-r--r--ospf6d/ospf6_zebra.h2
-rw-r--r--ospf6d/ospf6d.c2
-rw-r--r--ospf6d/ospf6d.h4
-rw-r--r--ospfclient/ospfclient.c2
-rw-r--r--ospfd/ospf_apiserver.c2
-rw-r--r--ospfd/ospf_bfd.c2
-rw-r--r--ospfd/ospf_bfd.h2
-rw-r--r--ospfd/ospf_main.c2
-rw-r--r--ospfd/ospf_snmp.c2
-rw-r--r--ospfd/ospf_zebra.c4
-rw-r--r--ospfd/ospf_zebra.h2
-rw-r--r--ospfd/ospfd.c2
-rw-r--r--ospfd/ospfd.h6
-rw-r--r--pathd/path_main.c2
-rw-r--r--pathd/path_pcep.c6
-rw-r--r--pathd/path_pcep.h2
-rw-r--r--pathd/path_pcep_controller.c2
-rw-r--r--pathd/path_pcep_controller.h6
-rw-r--r--pathd/path_ted.c2
-rw-r--r--pathd/path_ted.h4
-rw-r--r--pathd/path_zebra.c2
-rw-r--r--pathd/path_zebra.h2
-rw-r--r--pathd/pathd.h2
-rw-r--r--pbrd/pbr_main.c2
-rw-r--r--pbrd/pbr_zebra.h2
-rw-r--r--pimd/pim_instance.h2
-rw-r--r--pimd/pim_msdp.c2
-rw-r--r--pimd/pim_msdp.h6
-rw-r--r--ripd/rip_main.c2
-rw-r--r--ripd/rip_snmp.c4
-rw-r--r--ripd/rip_zebra.c2
-rw-r--r--ripd/ripd.h4
-rw-r--r--ripngd/ripng_main.c2
-rw-r--r--ripngd/ripng_zebra.c2
-rw-r--r--ripngd/ripngd.h4
-rw-r--r--sharpd/sharp_logpump.c2
-rw-r--r--sharpd/sharp_main.c2
-rw-r--r--sharpd/sharp_zebra.c2
-rw-r--r--staticd/static_bfd.c2
-rw-r--r--staticd/static_main.c2
-rw-r--r--staticd/static_routes.h2
-rw-r--r--staticd/static_zebra.h2
-rw-r--r--tests/bgpd/test_aspath.c2
-rw-r--r--tests/bgpd/test_capability.c2
-rw-r--r--tests/bgpd/test_ecommunity.c2
-rw-r--r--tests/bgpd/test_mp_attr.c2
-rw-r--r--tests/bgpd/test_mpath.c2
-rw-r--r--tests/bgpd/test_packet.c2
-rw-r--r--tests/bgpd/test_peer_attr.c2
-rw-r--r--tests/helpers/c/main.c2
-rw-r--r--tests/isisd/test_common.c2
-rw-r--r--tests/isisd/test_common.h2
-rw-r--r--tests/lib/cli/common_cli.c2
-rw-r--r--tests/lib/cli/common_cli.h2
-rw-r--r--tests/lib/cli/test_commands.c2
-rw-r--r--tests/lib/northbound/test_oper_data.c2
-rw-r--r--tests/lib/test_assert.c2
-rw-r--r--tests/lib/test_buffer.c2
-rw-r--r--tests/lib/test_checksum.c2
-rw-r--r--tests/lib/test_grpc.cpp4
-rw-r--r--tests/lib/test_heavy_thread.c2
-rw-r--r--tests/lib/test_heavy_wq.c2
-rw-r--r--tests/lib/test_memory.c2
-rw-r--r--tests/lib/test_nexthop_iter.c2
-rw-r--r--tests/lib/test_privs.c2
-rw-r--r--tests/lib/test_resolver.c2
-rw-r--r--tests/lib/test_segv.c2
-rw-r--r--tests/lib/test_sig.c2
-rw-r--r--tests/lib/test_srcdest_table.c2
-rw-r--r--tests/lib/test_stream.c2
-rw-r--r--tests/lib/test_table.c2
-rw-r--r--tests/lib/test_timer_correctness.c2
-rw-r--r--tests/lib/test_timer_performance.c2
-rw-r--r--tests/lib/test_zmq.c2
-rw-r--r--tests/ospfd/common.c2
-rw-r--r--tests/ospfd/common.h2
-rw-r--r--vrrpd/vrrp.h2
-rw-r--r--vrrpd/vrrp_main.c2
-rw-r--r--vtysh/vtysh.h4
-rw-r--r--vtysh/vtysh_main.c2
-rw-r--r--watchfrr/watchfrr.c2
-rw-r--r--zebra/dpdk/zebra_dplane_dpdk.c2
-rw-r--r--zebra/dplane_fpm_nl.c2
-rw-r--r--zebra/irdp_main.c2
-rw-r--r--zebra/kernel_netlink.c2
-rw-r--r--zebra/main.c2
-rw-r--r--zebra/sample_plugin.c2
-rw-r--r--zebra/zebra_dplane.c4
-rw-r--r--zebra/zebra_dplane.h2
-rw-r--r--zebra/zebra_fpm.c4
-rw-r--r--zebra/zebra_mlag_private.c2
-rw-r--r--zebra/zebra_opaque.c2
-rw-r--r--zebra/zebra_router.h4
-rw-r--r--zebra/zebra_snmp.c2
197 files changed, 330 insertions, 338 deletions
diff --git a/babeld/babel_main.c b/babeld/babel_main.c
index b4087bb79..574a35887 100644
--- a/babeld/babel_main.c
+++ b/babeld/babel_main.c
@@ -37,7 +37,7 @@ static void babel_exit_properly(void);
static void babel_save_state_file(void);
-struct event_master *master; /* quagga's threads handler */
+struct event_loop *master; /* quagga's threads handler */
struct timeval babel_now; /* current time */
unsigned char myid[8]; /* unique id (mac address of an interface) */
diff --git a/babeld/babel_main.h b/babeld/babel_main.h
index 30d1729c6..0f9792b18 100644
--- a/babeld/babel_main.h
+++ b/babeld/babel_main.h
@@ -9,7 +9,7 @@ Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek
#include "vty.h"
extern struct timeval babel_now; /* current time */
-extern struct event_master *master; /* quagga's threads handler */
+extern struct event_loop *master; /* quagga's threads handler */
extern int debug;
extern int resend_delay;
diff --git a/bfdd/bfd.h b/bfdd/bfd.h
index 025eae94d..5451e66c2 100644
--- a/bfdd/bfd.h
+++ b/bfdd/bfd.h
@@ -686,7 +686,7 @@ void bfd_key_iterate(hash_iter_func hif, void *arg);
unsigned long bfd_get_session_count(void);
/* Export callback functions for `event.c`. */
-extern struct event_master *master;
+extern struct event_loop *master;
void bfd_recvtimer_cb(struct event *t);
void bfd_echo_recvtimer_cb(struct event *t);
diff --git a/bfdd/bfdd.c b/bfdd/bfdd.c
index dbf5a6232..5fbe2f48f 100644
--- a/bfdd/bfdd.c
+++ b/bfdd/bfdd.c
@@ -32,7 +32,7 @@ DEFINE_MTYPE(BFDD, BFDD_CONTROL, "long-lived control socket memory");
DEFINE_MTYPE(BFDD, BFDD_NOTIFICATION, "short-lived control notification data");
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
/* BFDd privileges */
static zebra_capabilities_t _caps_p[] = {ZCAP_BIND, ZCAP_SYS_ADMIN, ZCAP_NET_RAW};
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c
index 024611588..8923c1933 100644
--- a/bgpd/bgp_bfd.c
+++ b/bgpd/bgp_bfd.c
@@ -609,7 +609,7 @@ DEFUN(no_neighbor_bfd_profile, no_neighbor_bfd_profile_cmd,
}
#endif /* HAVE_BFDD */
-void bgp_bfd_init(struct event_master *tm)
+void bgp_bfd_init(struct event_loop *tm)
{
/* Initialize BFD client functions */
bfd_protocol_integration_init(zclient, tm);
diff --git a/bgpd/bgp_bfd.h b/bgpd/bgp_bfd.h
index bd19cc337..61b4b7660 100644
--- a/bgpd/bgp_bfd.h
+++ b/bgpd/bgp_bfd.h
@@ -12,7 +12,7 @@
((((peer)->sort == BGP_PEER_IBGP) && !(peer)->shared_network) \
|| is_ebgp_multihop_configured((peer)))
-extern void bgp_bfd_init(struct event_master *tm);
+extern void bgp_bfd_init(struct event_loop *tm);
extern void bgp_bfd_peer_config_write(struct vty *vty, const struct peer *peer,
const char *addr);
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 8e9739843..0dfb3a106 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -2526,7 +2526,7 @@ static int bmp_config_write(struct bgp *bgp, struct vty *vty)
return 0;
}
-static int bgp_bmp_init(struct event_master *tm)
+static int bgp_bmp_init(struct event_loop *tm)
{
install_node(&bmp_node);
install_default(BMP_NODE);
diff --git a/bgpd/bgp_labelpool.c b/bgpd/bgp_labelpool.c
index 0ca3ce6a4..9943f57fb 100644
--- a/bgpd/bgp_labelpool.c
+++ b/bgpd/bgp_labelpool.c
@@ -177,7 +177,7 @@ static void lp_chunk_free(void *goner)
XFREE(MTYPE_BGP_LABEL_CHUNK, goner);
}
-void bgp_lp_init(struct event_master *master, struct labelpool *pool)
+void bgp_lp_init(struct event_loop *master, struct labelpool *pool)
{
if (BGP_DEBUG(labelpool, LABELPOOL))
zlog_debug("%s: entry", __func__);
diff --git a/bgpd/bgp_labelpool.h b/bgpd/bgp_labelpool.h
index 73a16f03b..9526cba0c 100644
--- a/bgpd/bgp_labelpool.h
+++ b/bgpd/bgp_labelpool.h
@@ -31,7 +31,7 @@ struct labelpool {
uint32_t next_chunksize; /* request this many labels */
};
-extern void bgp_lp_init(struct event_master *master, struct labelpool *pool);
+extern void bgp_lp_init(struct event_loop *master, struct labelpool *pool);
extern void bgp_lp_finish(void);
extern void bgp_lp_get(int type, void *labelid,
int (*cbfunc)(mpls_label_t label, void *labelid, bool allocated));
diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c
index cbdb70441..8e0944664 100644
--- a/bgpd/bgp_rpki.c
+++ b/bgpd/bgp_rpki.c
@@ -591,7 +591,7 @@ err:
}
-static int bgp_rpki_init(struct event_master *master)
+static int bgp_rpki_init(struct event_loop *master)
{
rpki_debug = false;
rtr_is_running = false;
diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c
index 940b8d3db..f2b420724 100644
--- a/bgpd/bgp_snmp.c
+++ b/bgpd/bgp_snmp.c
@@ -30,7 +30,7 @@
#include "bgpd/bgp_snmp_bgp4v2.h"
#include "bgpd/bgp_mplsvpn_snmp.h"
-static int bgp_snmp_init(struct event_master *tm)
+static int bgp_snmp_init(struct event_loop *tm)
{
smux_init(tm);
bgp_snmp_bgp4_init(tm);
diff --git a/bgpd/bgp_snmp_bgp4.c b/bgpd/bgp_snmp_bgp4.c
index c673eacec..1c586ad56 100644
--- a/bgpd/bgp_snmp_bgp4.c
+++ b/bgpd/bgp_snmp_bgp4.c
@@ -791,7 +791,7 @@ int bgpTrapBackwardTransition(struct peer *peer)
return 0;
}
-int bgp_snmp_bgp4_init(struct event_master *tm)
+int bgp_snmp_bgp4_init(struct event_loop *tm)
{
REGISTER_MIB("mibII/bgp", bgp_variables, variable, bgp_oid);
return 0;
diff --git a/bgpd/bgp_snmp_bgp4.h b/bgpd/bgp_snmp_bgp4.h
index 8030d638b..ccf00d6b7 100644
--- a/bgpd/bgp_snmp_bgp4.h
+++ b/bgpd/bgp_snmp_bgp4.h
@@ -71,6 +71,6 @@
extern int bgpTrapEstablished(struct peer *peer);
extern int bgpTrapBackwardTransition(struct peer *peer);
-extern int bgp_snmp_bgp4_init(struct event_master *tm);
+extern int bgp_snmp_bgp4_init(struct event_loop *tm);
#endif /* _FRR_BGP_SNMP_BGP4_H_ */
diff --git a/bgpd/bgp_snmp_bgp4v2.c b/bgpd/bgp_snmp_bgp4v2.c
index 3cafb4330..e2952ab3c 100644
--- a/bgpd/bgp_snmp_bgp4v2.c
+++ b/bgpd/bgp_snmp_bgp4v2.c
@@ -1394,7 +1394,7 @@ static struct variable bgpv2_variables[] = {
{1, 9, 1, BGP4V2_NLRI_PATH_ATTR_UNKNOWN, 2, 16}},
};
-int bgp_snmp_bgp4v2_init(struct event_master *tm)
+int bgp_snmp_bgp4v2_init(struct event_loop *tm)
{
REGISTER_MIB("mibII/bgpv2", bgpv2_variables, variable, bgpv2_oid);
return 0;
diff --git a/bgpd/bgp_snmp_bgp4v2.h b/bgpd/bgp_snmp_bgp4v2.h
index 134ab15b6..7cdad586b 100644
--- a/bgpd/bgp_snmp_bgp4v2.h
+++ b/bgpd/bgp_snmp_bgp4v2.h
@@ -81,6 +81,6 @@
#define BGP4V2_ESTABLISHED_NOTIFICATION 1
#define BGP4V2_BACKWARD_TRANSITION_NOTIFICATION 2
-extern int bgp_snmp_bgp4v2_init(struct event_master *tm);
+extern int bgp_snmp_bgp4v2_init(struct event_loop *tm);
#endif /* _FRR_BGP_SNMP_BGP4V2_H_ */
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index bca993c60..f3b1b948c 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -3443,7 +3443,7 @@ void bgp_if_init(void)
hook_register_prio(if_del, 0, bgp_if_delete_hook);
}
-void bgp_zebra_init(struct event_master *master, unsigned short instance)
+void bgp_zebra_init(struct event_loop *master, unsigned short instance)
{
zclient_num_connects = 0;
diff --git a/bgpd/bgp_zebra.h b/bgpd/bgp_zebra.h
index cfa75b9e4..b09be890e 100644
--- a/bgpd/bgp_zebra.h
+++ b/bgpd/bgp_zebra.h
@@ -18,8 +18,7 @@
/* Default weight for next hop, if doing weighted ECMP. */
#define BGP_ZEBRA_DEFAULT_NHOP_WEIGHT 1
-extern void bgp_zebra_init(struct event_master *master,
- unsigned short instance);
+extern void bgp_zebra_init(struct event_loop *master, unsigned short instance);
extern void bgp_if_init(void);
extern void bgp_zebra_init_tm_connect(struct bgp *bgp);
extern uint32_t bgp_zebra_tm_get_id(void);
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 33b46f7fe..ae46efef2 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -8010,7 +8010,7 @@ char *peer_uptime(time_t uptime2, char *buf, size_t len, bool use_json,
return buf;
}
-void bgp_master_init(struct event_master *master, const int buffer_size,
+void bgp_master_init(struct event_loop *master, const int buffer_size,
struct list *addresses)
{
qobj_init();
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 113571427..a08a2870e 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -98,7 +98,7 @@ struct bgp_master {
struct list *bgp;
/* BGP thread master. */
- struct event_master *master;
+ struct event_loop *master;
/* Listening sockets */
struct list *listen_sockets;
@@ -2156,7 +2156,7 @@ extern char *peer_uptime(time_t uptime2, char *buf, size_t len, bool use_json,
extern int bgp_config_write(struct vty *);
-extern void bgp_master_init(struct event_master *master, const int buffer_size,
+extern void bgp_master_init(struct event_loop *master, const int buffer_size,
struct list *addresses);
extern void bgp_init(unsigned short instance);
diff --git a/bgpd/rfapi/rfapi.h b/bgpd/rfapi/rfapi.h
index 18db46e28..3f61d5be1 100644
--- a/bgpd/rfapi/rfapi.h
+++ b/bgpd/rfapi/rfapi.h
@@ -335,7 +335,7 @@ struct rfapi_rfp_cfg {
* return value:
* rfp_start_val rfp returned value passed on rfp_stop and other rfapi calls
--------------------------------------------*/
-extern void *rfp_start(struct event_master *master, struct rfapi_rfp_cfg **cfgp,
+extern void *rfp_start(struct event_loop *master, struct rfapi_rfp_cfg **cfgp,
struct rfapi_rfp_cb_methods **cbmp);
/*------------------------------------------
diff --git a/bgpd/rfapi/rfapi_backend.h b/bgpd/rfapi/rfapi_backend.h
index e8f320da8..32ea0a282 100644
--- a/bgpd/rfapi/rfapi_backend.h
+++ b/bgpd/rfapi/rfapi_backend.h
@@ -14,7 +14,7 @@
#include "bgpd/bgp_nexthop.h"
extern void rfapi_init(void);
-extern void vnc_zebra_init(struct event_master *master);
+extern void vnc_zebra_init(struct event_loop *master);
extern void vnc_zebra_destroy(void);
extern void rfapi_delete(struct bgp *);
diff --git a/bgpd/rfapi/vnc_zebra.c b/bgpd/rfapi/vnc_zebra.c
index 99ecd8411..4c55c2f63 100644
--- a/bgpd/rfapi/vnc_zebra.c
+++ b/bgpd/rfapi/vnc_zebra.c
@@ -890,7 +890,7 @@ static zclient_handler *const vnc_handlers[] = {
* Modeled after bgp_zebra.c'bgp_zebra_init()
* Charriere asks, "Is it possible to carry two?"
*/
-void vnc_zebra_init(struct event_master *master)
+void vnc_zebra_init(struct event_loop *master)
{
/* Set default values. */
zclient_vnc = zclient_new(master, &zclient_options_default,
diff --git a/bgpd/rfp-example/librfp/rfp_example.c b/bgpd/rfp-example/librfp/rfp_example.c
index bc944e160..1ada36bbc 100644
--- a/bgpd/rfp-example/librfp/rfp_example.c
+++ b/bgpd/rfp-example/librfp/rfp_example.c
@@ -17,7 +17,7 @@
struct rfp_instance_t {
struct rfapi_rfp_cfg rfapi_config;
struct rfapi_rfp_cb_methods rfapi_callbacks;
- struct event_master *master;
+ struct event_loop *master;
uint32_t config_var;
};
@@ -271,7 +271,7 @@ static int rfp_cfg_write_cb(struct vty *vty, void *rfp_start_val)
* rfp_start_val rfp returned value passed on rfp_stop and rfp_cfg_write
*
--------------------------------------------*/
-void *rfp_start(struct event_master *master, struct rfapi_rfp_cfg **cfgp,
+void *rfp_start(struct event_loop *master, struct rfapi_rfp_cfg **cfgp,
struct rfapi_rfp_cb_methods **cbmp)
{
memset(&global_rfi, 0, sizeof(global_rfi));
diff --git a/doc/developer/modules.rst b/doc/developer/modules.rst
index 6dd65d67d..647b96aa0 100644
--- a/doc/developer/modules.rst
+++ b/doc/developer/modules.rst
@@ -58,7 +58,7 @@ Basic boilerplate:
#include "libfrr.h"
#include "event.h"
- static int module_late_init(struct event_master *master)
+ static int module_late_init(struct event_loop *master)
{
/* Do initialization stuff here */
return 0;
diff --git a/doc/developer/process-architecture.rst b/doc/developer/process-architecture.rst
index d2bf141a3..33ef278c4 100644
--- a/doc/developer/process-architecture.rst
+++ b/doc/developer/process-architecture.rst
@@ -47,7 +47,7 @@ section. For now it provides basic information necessary to understand the
interplay between the event system and kernel threads.
The core event system is implemented in :file:`lib/thread.[ch]`. The primary
-structure is ``struct event_master``, hereafter referred to as a
+structure is ``struct event_loop``, hereafter referred to as a
``threadmaster``. A ``threadmaster`` is a global state object, or context, that
holds all the tasks currently pending execution as well as statistics on tasks
that have already executed. The event system is driven by adding tasks to this
@@ -95,7 +95,7 @@ irrelevant for the time being) for the specific type. For example, to add a
::
- event_add_read(struct event_master *master, int (*handler)(struct event *), void *arg, int fd, struct event **ref);
+ event_add_read(struct event_loop *master, int (*handler)(struct event *), void *arg, int fd, struct event **ref);
The ``struct event`` is then created and added to the appropriate internal
datastructure within the ``threadmaster``. Note that the ``READ`` and
diff --git a/eigrpd/eigrp_main.c b/eigrpd/eigrp_main.c
index 3b94e5da2..0ccc9810a 100644
--- a/eigrpd/eigrp_main.c
+++ b/eigrpd/eigrp_main.c
@@ -76,7 +76,7 @@ struct zebra_privs_t eigrpd_privs = {
struct option longopts[] = {{0}};
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
/* Forward declaration of daemon info structure. */
static struct frr_daemon_info eigrpd_di;
diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c
index f5a71fd4f..70365adad 100644
--- a/eigrpd/eigrp_zebra.c
+++ b/eigrpd/eigrp_zebra.c
@@ -49,7 +49,7 @@ static int eigrp_zebra_read_route(ZAPI_CALLBACK_ARGS);
struct zclient *zclient = NULL;
/* For registering threads. */
-extern struct event_master *master;
+extern struct event_loop *master;
struct in_addr router_id_zebra;
/* Router-id update message from zebra. */
diff --git a/eigrpd/eigrpd.h b/eigrpd/eigrpd.h
index 32c7e44af..a6a4e39a5 100644
--- a/eigrpd/eigrpd.h
+++ b/eigrpd/eigrpd.h
@@ -35,7 +35,7 @@ struct eigrp_master {
struct list *eigrp;
/* EIGRP thread master. */
- struct event_master *master;
+ struct event_loop *master;
/* Zebra interface list. */
struct list *iflist;
@@ -51,7 +51,7 @@ struct eigrp_master {
/* Extern variables. */
extern struct zclient *zclient;
-extern struct event_master *master;
+extern struct event_loop *master;
extern struct eigrp_master *eigrp_om;
extern struct zebra_privs_t eigrpd_privs;
diff --git a/isisd/isis_bfd.c b/isisd/isis_bfd.c
index cdd84f24b..5e24e3521 100644
--- a/isisd/isis_bfd.c
+++ b/isisd/isis_bfd.c
@@ -209,7 +209,7 @@ static int bfd_handle_circuit_add_addr(struct isis_circuit *circuit)
return 0;
}
-void isis_bfd_init(struct event_master *tm)
+void isis_bfd_init(struct event_loop *tm)
{
bfd_protocol_integration_init(zclient, tm);
diff --git a/isisd/isis_bfd.h b/isisd/isis_bfd.h
index 946b3c7b7..3cf0ed521 100644
--- a/isisd/isis_bfd.h
+++ b/isisd/isis_bfd.h
@@ -7,10 +7,10 @@
#define ISIS_BFD_H
struct isis_circuit;
-struct event_master;
+struct event_loop;
void isis_bfd_circuit_cmd(struct isis_circuit *circuit);
-void isis_bfd_init(struct event_master *tm);
+void isis_bfd_init(struct event_loop *tm);
#endif
diff --git a/isisd/isis_main.c b/isisd/isis_main.c
index 0e8780c47..65d1206c1 100644
--- a/isisd/isis_main.c
+++ b/isisd/isis_main.c
@@ -77,7 +77,7 @@ static const struct option longopts[] = {
{0}};
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
/*
* Prototypes.
diff --git a/isisd/isis_snmp.c b/isisd/isis_snmp.c
index 595bf4bdb..fa566c547 100644
--- a/isisd/isis_snmp.c
+++ b/isisd/isis_snmp.c
@@ -2797,7 +2797,7 @@ static uint8_t *isis_snmp_find_isadj_prot_supp(struct variable *v, oid *name,
/* Register ISIS-MIB. */
-static int isis_snmp_init(struct event_master *tm)
+static int isis_snmp_init(struct event_loop *tm)
{
struct isis_func_to_prefix *h2f = isis_func_to_prefix_arr;
struct variable *v;
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c
index 2144b54a1..8a279558a 100644
--- a/isisd/isis_zebra.c
+++ b/isisd/isis_zebra.c
@@ -828,7 +828,7 @@ static zclient_handler *const isis_handlers[] = {
[ZEBRA_CLIENT_CLOSE_NOTIFY] = isis_zebra_client_close_notify,
};
-void isis_zebra_init(struct event_master *master, int instance)
+void isis_zebra_init(struct event_loop *master, int instance)
{
/* Initialize asynchronous zclient. */
zclient = zclient_new(master, &zclient_options_default, isis_handlers,
diff --git a/isisd/isis_zebra.h b/isisd/isis_zebra.h
index ab2f7244a..359e39b59 100644
--- a/isisd/isis_zebra.h
+++ b/isisd/isis_zebra.h
@@ -20,7 +20,7 @@ struct label_chunk {
};
#define CHUNK_SIZE 64
-void isis_zebra_init(struct event_master *master, int instance);
+void isis_zebra_init(struct event_loop *master, int instance);
void isis_zebra_stop(void);
struct isis_route_info;
diff --git a/isisd/isisd.c b/isisd/isisd.c
index 40f64089c..20a48a03f 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -166,7 +166,7 @@ struct isis *isis_lookup_by_sysid(const uint8_t *sysid)
return NULL;
}
-void isis_master_init(struct event_master *master)
+void isis_master_init(struct event_loop *master)
{
memset(&isis_master, 0, sizeof(isis_master));
im = &isis_master;
diff --git a/isisd/isisd.h b/isisd/isisd.h
index d33c4108b..a06dc46a3 100644
--- a/isisd/isisd.h
+++ b/isisd/isisd.h
@@ -71,7 +71,7 @@ struct isis_master {
/* ISIS instance. */
struct list *isis;
/* ISIS thread master. */
- struct event_master *master;
+ struct event_loop *master;
uint8_t options;
};
#define F_ISIS_UNIT_TEST 0x01
@@ -252,7 +252,7 @@ DECLARE_MTYPE(ISIS_PLIST_NAME);
DECLARE_HOOK(isis_area_overload_bit_update, (struct isis_area * area), (area));
void isis_terminate(void);
-void isis_master_init(struct event_master *master);
+void isis_master_init(struct event_loop *master);
void isis_vrf_link(struct isis *isis, struct vrf *vrf);
void isis_vrf_unlink(struct isis *isis, struct vrf *vrf);
struct isis *isis_lookup_by_vrfid(vrf_id_t vrf_id);
@@ -329,7 +329,7 @@ void config_end_lsp_generate(struct isis_area *area);
#define ISIS_SR "/frr-isisd:isis/instance/segment-routing"
/* Master of threads. */
-extern struct event_master *master;
+extern struct event_loop *master;
extern unsigned long debug_adj_pkt;
extern unsigned long debug_snp_pkt;
diff --git a/ldpd/ldp_snmp.c b/ldpd/ldp_snmp.c
index 7ddd7bc88..ed391ac60 100644
--- a/ldpd/ldp_snmp.c
+++ b/ldpd/ldp_snmp.c
@@ -1173,7 +1173,7 @@ static int ldp_snmp_nbr_state_change(struct nbr * nbr, int old_state)
return 0;
}
-static int ldp_snmp_init(struct event_master *tm)
+static int ldp_snmp_init(struct event_loop *tm)
{
hook_register(agentx_enabled, ldp_snmp_agentx_enabled);
@@ -1182,7 +1182,7 @@ static int ldp_snmp_init(struct event_master *tm)
return 0;
}
-static int ldp_snmp_register_mib(struct event_master *tm)
+static int ldp_snmp_register_mib(struct event_loop *tm)
{
static int registered = 0;
diff --git a/ldpd/ldp_zebra.c b/ldpd/ldp_zebra.c
index 1773d9c11..02cd1678e 100644
--- a/ldpd/ldp_zebra.c
+++ b/ldpd/ldp_zebra.c
@@ -690,7 +690,7 @@ static zclient_handler *const ldp_handlers[] = {
[ZEBRA_OPAQUE_MESSAGE] = ldp_zebra_opaque_msg_handler,
};
-void ldp_zebra_init(struct event_master *master)
+void ldp_zebra_init(struct event_loop *master)
{
if_zapi_callbacks(ldp_ifp_create, ldp_ifp_up,
ldp_ifp_down, ldp_ifp_destroy);
diff --git a/ldpd/ldpd.c b/ldpd/ldpd.c
index 8d173c608..3c616d4a8 100644
--- a/ldpd/ldpd.c
+++ b/ldpd/ldpd.c
@@ -77,7 +77,7 @@ static pid_t lde_pid;
static struct frr_daemon_info ldpd_di;
-DEFINE_HOOK(ldp_register_mib, (struct event_master * tm), (tm));
+DEFINE_HOOK(ldp_register_mib, (struct event_loop * tm), (tm));
static void ldp_load_module(const char *name)
{
@@ -104,7 +104,7 @@ enum ldpd_process ldpd_process;
#define LDP_VTY_PORT 2612
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
/* ldpd privileges */
static zebra_capabilities_t _caps_p [] =
diff --git a/ldpd/ldpd.h b/ldpd/ldpd.h
index 3d0615cc0..9de3ea4a5 100644
--- a/ldpd/ldpd.h
+++ b/ldpd/ldpd.h
@@ -883,11 +883,11 @@ const char *pw_type_name(uint16_t);
const char *pw_error_code(uint8_t);
/* quagga */
-extern struct event_master *master;
+extern struct event_loop *master;
extern char ctl_sock_path[MAXPATHLEN];
/* ldp_zebra.c */
-void ldp_zebra_init(struct event_master *m);
+void ldp_zebra_init(struct event_loop *m);
void ldp_zebra_destroy(void);
int ldp_sync_zebra_send_state_update(struct ldp_igp_sync_if_state *);
int ldp_zebra_send_rlfa_labels(struct zapi_rlfa_response *
@@ -904,7 +904,7 @@ void ldp_zebra_regdereg_zebra_info(bool want_register);
(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_INTFACELOCAL))
#endif
-DECLARE_HOOK(ldp_register_mib, (struct event_master * tm), (tm));
+DECLARE_HOOK(ldp_register_mib, (struct event_loop * tm), (tm));
extern void ldp_agentx_enabled(void);
diff --git a/lib/agentx.c b/lib/agentx.c
index 3b9be3397..45f14c270 100644
--- a/lib/agentx.c
+++ b/lib/agentx.c
@@ -27,7 +27,7 @@ DEFINE_HOOK(agentx_enabled, (), ());
static bool agentx_enabled = false;
-static struct event_master *agentx_tm;
+static struct event_loop *agentx_tm;
static struct event *timeout_thr = NULL;
static struct list *events = NULL;
@@ -244,7 +244,7 @@ bool smux_enabled(void)
return agentx_enabled;
}
-void smux_init(struct event_master *tm)
+void smux_init(struct event_loop *tm)
{
agentx_tm = tm;
diff --git a/lib/bfd.c b/lib/bfd.c
index 9cf182931..9dbeaab0d 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -111,7 +111,7 @@ struct bfd_sessions_global {
struct bfd_source_list source_list;
/** Pointer to FRR's event manager. */
- struct event_master *tm;
+ struct event_loop *tm;
/** Pointer to zebra client data structure. */
struct zclient *zc;
@@ -1039,7 +1039,7 @@ static int bfd_protocol_integration_finish(void)
return 0;
}
-void bfd_protocol_integration_init(struct zclient *zc, struct event_master *tm)
+void bfd_protocol_integration_init(struct zclient *zc, struct event_loop *tm)
{
/* Initialize data structure. */
TAILQ_INIT(&bsglobal.bsplist);
diff --git a/lib/bfd.h b/lib/bfd.h
index 44f9a5ba1..bfa528734 100644
--- a/lib/bfd.h
+++ b/lib/bfd.h
@@ -348,7 +348,7 @@ void bfd_sess_show(struct vty *vty, struct json_object *json,
* Initializes the BFD integration library. This function executes the
* following actions:
*
- * - Copy the `struct event_master` pointer to use as "thread" to execute
+ * - Copy the `struct event_loop` pointer to use as "thread" to execute
* the BFD session parameters installation.
* - Copy the `struct zclient` pointer to install its callbacks.
* - Initializes internal data structures.
@@ -356,7 +356,7 @@ void bfd_sess_show(struct vty *vty, struct json_object *json,
* \param tm normally the daemon main thread event manager.
* \param zc the zebra client of the daemon.
*/
-void bfd_protocol_integration_init(struct zclient *zc, struct event_master *tm);
+void bfd_protocol_integration_init(struct zclient *zc, struct event_loop *tm);
/**
* BFD session registration arguments.
diff --git a/lib/event.c b/lib/event.c
index c23f1f8a9..f95e98a7f 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -73,7 +73,7 @@ pthread_key_t thread_current;
static pthread_mutex_t masters_mtx = PTHREAD_MUTEX_INITIALIZER;
static struct list *masters;
-static void thread_free(struct event_master *master, struct event *thread);
+static void thread_free(struct event_loop *master, struct event *thread);
#ifndef EXCLUDE_CPU_TIME
#define EXCLUDE_CPU_TIME 0
@@ -185,7 +185,7 @@ static void cpu_record_print(struct vty *vty, uint8_t filter)
{
struct cpu_event_history tmp;
void *args[3] = {&tmp, vty, &filter};
- struct event_master *m;
+ struct event_loop *m;
struct listnode *ln;
if (!cputime_enabled)
@@ -263,7 +263,7 @@ static void cpu_record_hash_clear(struct hash_bucket *bucket, void *args[])
static void cpu_record_clear(uint8_t filter)
{
uint8_t *tmp = &filter;
- struct event_master *m;
+ struct event_loop *m;
struct listnode *ln;
frr_with_mutex (&masters_mtx) {
@@ -395,7 +395,7 @@ ALIAS (service_walltime_warning,
"Set up miscellaneous service\n"
"Warn for tasks exceeding total wallclock threshold\n")
-static void show_thread_poll_helper(struct vty *vty, struct event_master *m)
+static void show_thread_poll_helper(struct vty *vty, struct event_loop *m)
{
const char *name = m->name ? m->name : "main";
char underline[strlen(name) + 1];
@@ -444,7 +444,7 @@ DEFUN_NOSH (show_thread_poll,
"Show poll FD's and information\n")
{
struct listnode *node;
- struct event_master *m;
+ struct event_loop *m;
frr_with_mutex (&masters_mtx) {
for (ALL_LIST_ELEMENTS_RO(masters, node, m)) {
@@ -481,7 +481,7 @@ DEFUN (clear_thread_cpu,
return CMD_SUCCESS;
}
-static void show_thread_timers_helper(struct vty *vty, struct event_master *m)
+static void show_thread_timers_helper(struct vty *vty, struct event_loop *m)
{
const char *name = m->name ? m->name : "main";
char underline[strlen(name) + 1];
@@ -506,7 +506,7 @@ DEFPY_NOSH (show_thread_timers,
"Show all timers and how long they have in the system\n")
{
struct listnode *node;
- struct event_master *m;
+ struct event_loop *m;
frr_with_mutex (&masters_mtx) {
for (ALL_LIST_ELEMENTS_RO(masters, node, m))
@@ -544,14 +544,14 @@ static void initializer(void)
pthread_key_create(&thread_current, NULL);
}
-struct event_master *event_master_create(const char *name)
+struct event_loop *event_master_create(const char *name)
{
- struct event_master *rv;
+ struct event_loop *rv;
struct rlimit limit;
pthread_once(&init_once, &initializer);
- rv = XCALLOC(MTYPE_EVENT_MASTER, sizeof(struct event_master));
+ rv = XCALLOC(MTYPE_EVENT_MASTER, sizeof(struct event_loop));
/* Initialize master mutex */
pthread_mutex_init(&rv->mtx, NULL);
@@ -623,7 +623,7 @@ struct event_master *event_master_create(const char *name)
return rv;
}
-void event_master_set_name(struct event_master *master, const char *name)
+void event_master_set_name(struct event_loop *master, const char *name)
{
frr_with_mutex (&master->mtx) {
XFREE(MTYPE_EVENT_MASTER, master->name);
@@ -634,7 +634,7 @@ void event_master_set_name(struct event_master *master, const char *name)
#define EVENT_UNUSED_DEPTH 10
/* Move thread to unuse list. */
-static void thread_add_unuse(struct event_master *m, struct event *thread)
+static void thread_add_unuse(struct event_loop *m, struct event *thread)
{
pthread_mutex_t mtxc = thread->mtx;
@@ -656,8 +656,7 @@ static void thread_add_unuse(struct event_master *m, struct event *thread)
}
/* Free all unused thread. */
-static void thread_list_free(struct event_master *m,
- struct event_list_head *list)
+static void thread_list_free(struct event_loop *m, struct event_list_head *list)
{
struct event *t;
@@ -665,8 +664,7 @@ static void thread_list_free(struct event_master *m,
thread_free(m, t);
}
-static void thread_array_free(struct event_master *m,
- struct event **thread_array)
+static void thread_array_free(struct event_loop *m, struct event **thread_array)
{
struct event *t;
int index;
@@ -689,7 +687,7 @@ static void thread_array_free(struct event_master *m,
* If we are shutting down, Free up unused threads
* So we can see if we forget to shut anything off
*/
-void event_master_free_unused(struct event_master *m)
+void event_master_free_unused(struct event_loop *m)
{
frr_with_mutex (&m->mtx) {
struct event *t;
@@ -699,7 +697,7 @@ void event_master_free_unused(struct event_master *m)
}
/* Stop thread scheduler. */
-void event_master_free(struct event_master *m)
+void event_master_free(struct event_loop *m)
{
struct event *t;
@@ -791,7 +789,7 @@ char *event_timer_to_hhmmss(char *buf, int buf_size, struct event *t_timer)
}
/* Get new thread. */
-static struct event *thread_get(struct event_master *m, uint8_t type,
+static struct event *thread_get(struct event_loop *m, uint8_t type,
void (*func)(struct event *), void *arg,
const struct xref_eventsched *xref)
{
@@ -838,7 +836,7 @@ static struct event *thread_get(struct event_master *m, uint8_t type,
return thread;
}
-static void thread_free(struct event_master *master, struct event *thread)
+static void thread_free(struct event_loop *master, struct event *thread)
{
/* Update statistics. */
assert(master->alloc > 0);
@@ -849,7 +847,7 @@ static void thread_free(struct event_master *master, struct event *thread)
XFREE(MTYPE_THREAD, thread);
}
-static int fd_poll(struct event_master *m, const struct timeval *timer_wait,
+static int fd_poll(struct event_loop *m, const struct timeval *timer_wait,
bool *eintr_p)
{
sigset_t origsigs;
@@ -948,7 +946,7 @@ done:
/* Add new read thread. */
void _event_add_read_write(const struct xref_eventsched *xref,
- struct event_master *m, void (*func)(struct event *),
+ struct event_loop *m, void (*func)(struct event *),
void *arg, int fd, struct event **t_ptr)
{
int dir = xref->event_type;
@@ -1027,7 +1025,7 @@ void _event_add_read_write(const struct xref_eventsched *xref,
}
static void _event_add_timer_timeval(const struct xref_eventsched *xref,
- struct event_master *m,
+ struct event_loop *m,
void (*func)(struct event *), void *arg,
struct timeval *time_relative,
struct event **t_ptr)
@@ -1080,9 +1078,9 @@ static void _event_add_timer_timeval(const struct xref_eventsched *xref,
/* Add timer event thread. */
-void _event_add_timer(const struct xref_eventsched *xref,
- struct event_master *m, void (*func)(struct event *),
- void *arg, long timer, struct event **t_ptr)
+void _event_add_timer(const struct xref_eventsched *xref, struct event_loop *m,
+ void (*func)(struct event *), void *arg, long timer,
+ struct event **t_ptr)
{
struct timeval trel;
@@ -1096,7 +1094,7 @@ void _event_add_timer(const struct xref_eventsched *xref,
/* Add timer event thread with "millisecond" resolution */
void _event_add_timer_msec(const struct xref_eventsched *xref,
- struct event_master *m, void (*func)(struct event *),
+ struct event_loop *m, void (*func)(struct event *),
void *arg, long timer, struct event **t_ptr)
{
struct timeval trel;
@@ -1111,16 +1109,16 @@ void _event_add_timer_msec(const struct xref_eventsched *xref,
/* Add timer event thread with "timeval" resolution */
void _event_add_timer_tv(const struct xref_eventsched *xref,
- struct event_master *m, void (*func)(struct event *),
+ struct event_loop *m, void (*func)(struct event *),
void *arg, struct timeval *tv, struct event **t_ptr)
{
_event_add_timer_timeval(xref, m, func, arg, tv, t_ptr);
}
/* Add simple event thread. */
-void _event_add_event(const struct xref_eventsched *xref,
- struct event_master *m, void (*func)(struct event *),
- void *arg, int val, struct event **t_ptr)
+void _event_add_event(const struct xref_eventsched *xref, struct event_loop *m,
+ void (*func)(struct event *), void *arg, int val,
+ struct event **t_ptr)
{
struct event *thread = NULL;
@@ -1166,7 +1164,7 @@ void _event_add_event(const struct xref_eventsched *xref,
* - POLLIN
* - POLLOUT
*/
-static void event_cancel_rw(struct event_master *master, int fd, short state,
+static void event_cancel_rw(struct event_loop *master, int fd, short state,
int idx_hint)
{
bool found = false;
@@ -1232,7 +1230,7 @@ static void event_cancel_rw(struct event_master *master, int fd, short state,
* Process task cancellation given a task argument: iterate through the
* various lists of tasks, looking for any that match the argument.
*/
-static void cancel_arg_helper(struct event_master *master,
+static void cancel_arg_helper(struct event_loop *master,
const struct cancel_req *cr)
{
struct event *t;
@@ -1325,7 +1323,7 @@ static void cancel_arg_helper(struct event_master *master,
* @param master the thread master to process
* @REQUIRE master->mtx
*/
-static void do_event_cancel(struct event_master *master)
+static void do_event_cancel(struct event_loop *master)
{
struct event_list_head *list = NULL;
struct event **thread_array = NULL;
@@ -1407,7 +1405,7 @@ static void do_event_cancel(struct event_master *master)
/*
* Helper function used for multiple flavors of arg-based cancellation.
*/
-static void cancel_event_helper(struct event_master *m, void *arg, int flags)
+static void cancel_event_helper(struct event_loop *m, void *arg, int flags)
{
struct cancel_req *cr;
@@ -1436,7 +1434,7 @@ static void cancel_event_helper(struct event_master *m, void *arg, int flags)
* @param m the event_master to cancel from
* @param arg the argument passed when creating the event
*/
-void event_cancel_event(struct event_master *master, void *arg)
+void event_cancel_event(struct event_loop *master, void *arg)
{
cancel_event_helper(master, arg, 0);
}
@@ -1449,7 +1447,7 @@ void event_cancel_event(struct event_master *master, void *arg)
* @param m the event_master to cancel from
* @param arg the argument passed when creating the event
*/
-void event_cancel_event_ready(struct event_master *m, void *arg)
+void event_cancel_event_ready(struct event_loop *m, void *arg)
{
/* Only cancel ready/event tasks */
@@ -1465,7 +1463,7 @@ void event_cancel_event_ready(struct event_master *m, void *arg)
*/
void event_cancel(struct event **thread)
{
- struct event_master *master;
+ struct event_loop *master;
if (thread == NULL || *thread == NULL)
return;
@@ -1514,7 +1512,7 @@ void event_cancel(struct event **thread)
* @param thread pointer to thread to cancel
* @param eventobj the event
*/
-void event_cancel_async(struct event_master *master, struct event **thread,
+void event_cancel_async(struct event_loop *master, struct event **thread,
void *eventobj)
{
assert(!(thread && eventobj) && (thread || eventobj));
@@ -1567,7 +1565,7 @@ static struct timeval *thread_timer_wait(struct event_timer_list_head *timers,
return timer_val;
}
-static struct event *thread_run(struct event_master *m, struct event *thread,
+static struct event *thread_run(struct event_loop *m, struct event *thread,
struct event *fetch)
{
*fetch = *thread;
@@ -1575,9 +1573,8 @@ static struct event *thread_run(struct event_master *m, struct event *thread,
return fetch;
}
-static int thread_process_io_helper(struct event_master *m,
- struct event *thread, short state,
- short actual_state, int pos)
+static int thread_process_io_helper(struct event_loop *m, struct event *thread,
+ short state, short actual_state, int pos)
{
struct event **thread_array;
@@ -1623,7 +1620,7 @@ static int thread_process_io_helper(struct event_master *m,
* @param m the thread master
* @param num the number of active file descriptors (return value of poll())
*/
-static void thread_process_io(struct event_master *m, unsigned int num)
+static void thread_process_io(struct event_loop *m, unsigned int num)
{
unsigned int ready = 0;
struct pollfd *pfds = m->handler.copy;
@@ -1681,7 +1678,7 @@ static void thread_process_io(struct event_master *m, unsigned int num)
}
/* Add all timers that have popped to the ready list. */
-static unsigned int thread_process_timers(struct event_master *m,
+static unsigned int thread_process_timers(struct event_loop *m,
struct timeval *timenow)
{
struct timeval prev = *timenow;
@@ -1738,7 +1735,7 @@ static unsigned int thread_process(struct event_list_head *list)
/* Fetch next ready thread. */
-struct event *event_fetch(struct event_master *m, struct event *fetch)
+struct event *event_fetch(struct event_loop *m, struct event *fetch)
{
struct event *thread = NULL;
struct timeval now;
@@ -2055,7 +2052,7 @@ void event_call(struct event *thread)
}
/* Execute thread */
-void _event_execute(const struct xref_eventsched *xref, struct event_master *m,
+void _event_execute(const struct xref_eventsched *xref, struct event_loop *m,
void (*func)(struct event *), void *arg, int val)
{
struct event *thread;
diff --git a/lib/event.h b/lib/event.h
index 7ea4152e5..107949900 100644
--- a/lib/event.h
+++ b/lib/event.h
@@ -66,7 +66,7 @@ struct xref_eventsched {
};
/* Master of the theads. */
-struct event_master {
+struct event_loop {
char *name;
struct event **read;
@@ -109,7 +109,7 @@ struct event {
struct event_list_item eventitem;
struct event_timer_list_item timeritem;
struct event **ref; /* external reference (if given) */
- struct event_master *master; /* pointer to the struct event_master */
+ struct event_loop *master; /* pointer to the struct event_loop */
void (*func)(struct event *); /* event function */
void *arg; /* event argument */
union {
@@ -209,48 +209,48 @@ struct cpu_event_history {
}) /* end */
/* Prototypes. */
-extern struct event_master *event_master_create(const char *name);
-void event_master_set_name(struct event_master *master, const char *name);
-extern void event_master_free(struct event_master *m);
-extern void event_master_free_unused(struct event_master *m);
+extern struct event_loop *event_master_create(const char *name);
+void event_master_set_name(struct event_loop *master, const char *name);
+extern void event_master_free(struct event_loop *m);
+extern void event_master_free_unused(struct event_loop *m);
extern void _event_add_read_write(const struct xref_eventsched *xref,
- struct event_master *master,
+ struct event_loop *master,
void (*fn)(struct event *), void *arg, int fd,
struct event **tref);
extern void _event_add_timer(const struct xref_eventsched *xref,
- struct event_master *master,
+ struct event_loop *master,
void (*fn)(struct event *), void *arg, long t,
struct event **tref);
extern void _event_add_timer_msec(const struct xref_eventsched *xref,
- struct event_master *master,
+ struct event_loop *master,
void (*fn)(struct event *), void *arg, long t,
struct event **tref);
extern void _event_add_timer_tv(const struct xref_eventsched *xref,
- struct event_master *master,
+ struct event_loop *master,
void (*fn)(struct event *), void *arg,
struct timeval *tv, struct event **tref);
extern void _event_add_event(const struct xref_eventsched *xref,
- struct event_master *master,
+ struct event_loop *master,
void (*fn)(struct event *), void *arg, int val,
struct event **tref);
extern void _event_execute(const struct xref_eventsched *xref,
- struct event_master *master,
+ struct event_loop *master,
void (*fn)(struct event *), void *arg, int val);
extern void event_cancel(struct event **event);
-extern void event_cancel_async(struct event_master *m, struct event **eptr,
+extern void event_cancel_async(struct event_loop *m, struct event **eptr,
void *data);
/* Cancel ready tasks with an arg matching 'arg' */
-extern void event_cancel_event_ready(struct event_master *m, void *arg);
+extern void event_cancel_event_ready(struct event_loop *m, void *arg);
/* Cancel all tasks with an arg matching 'arg', including timers and io */
-extern void event_cancel_event(struct event_master *m, void *arg);
-extern struct event *event_fetch(struct event_master *m, struct event *event);
+extern void event_cancel_event(struct event_loop *m, void *arg);
+extern struct event *event_fetch(struct event_loop *m, struct event *event);
extern void event_call(struct event *event);
extern unsigned long event_timer_remain_second(struct event *event);
extern struct timeval event_timer_remain(struct event *event);
diff --git a/lib/frr_pthread.h b/lib/frr_pthread.h
index 821e0f1b4..36d0bdae8 100644
--- a/lib/frr_pthread.h
+++ b/lib/frr_pthread.h
@@ -41,7 +41,7 @@ struct frr_pthread {
struct rcu_thread *rcu_thread;
/* thread master for this pthread's thread.c event loop */
- struct event_master *master;
+ struct event_loop *master;
/* caller-specified data; start & stop funcs, name, id */
struct frr_pthread_attr attr;
diff --git a/lib/frr_zmq.c b/lib/frr_zmq.c
index 98cf9ee44..0b17e781e 100644
--- a/lib/frr_zmq.c
+++ b/lib/frr_zmq.c
@@ -150,7 +150,7 @@ out_err:
}
int _frrzmq_event_add_read(const struct xref_eventsched *xref,
- struct event_master *master,
+ struct event_loop *master,
void (*msgfunc)(void *arg, void *zmqsock),
void (*partfunc)(void *arg, void *zmqsock,
zmq_msg_t *msg, unsigned partnum),
@@ -258,7 +258,7 @@ out_err:
}
int _frrzmq_event_add_write(const struct xref_eventsched *xref,
- struct event_master *master,
+ struct event_loop *master,
void (*msgfunc)(void *arg, void *zmqsock),
void (*errfunc)(void *arg, void *zmqsock),
void *arg, void *zmqsock, struct frrzmq_cb **cbp)
@@ -342,7 +342,7 @@ void frrzmq_check_events(struct frrzmq_cb **cbp, struct cb_core *core,
if (zmq_getsockopt(cb->zmqsock, ZMQ_EVENTS, &events, &len))
return;
if ((events & event) && core->thread && !core->cancelled) {
- struct event_master *tm = core->thread->master;
+ struct event_loop *tm = core->thread->master;
event_cancel(&core->thread);
diff --git a/lib/frr_zmq.h b/lib/frr_zmq.h
index 47b2e954a..44f209b25 100644
--- a/lib/frr_zmq.h
+++ b/lib/frr_zmq.h
@@ -109,14 +109,14 @@ struct frrzmq_cb;
*/
extern int
_frrzmq_event_add_read(const struct xref_eventsched *xref,
- struct event_master *master,
+ struct event_loop *master,
void (*msgfunc)(void *arg, void *zmqsock),
void (*partfunc)(void *arg, void *zmqsock,
zmq_msg_t *msg, unsigned partnum),
void (*errfunc)(void *arg, void *zmqsock), void *arg,
void *zmqsock, struct frrzmq_cb **cb);
extern int _frrzmq_event_add_write(const struct xref_eventsched *xref,
- struct event_master *master,
+ struct event_loop *master,
void (*msgfunc)(void *arg, void *zmqsock),
void (*errfunc)(void *arg, void *zmqsock),
void *arg, void *zmqsock,
diff --git a/lib/grammar_sandbox_main.c b/lib/grammar_sandbox_main.c
index 5f72dcbeb..abd42f359 100644
--- a/lib/grammar_sandbox_main.c
+++ b/lib/grammar_sandbox_main.c
@@ -23,7 +23,7 @@ static void vty_do_exit(int isexit)
exit(0);
}
-struct event_master *master;
+struct event_loop *master;
int main(int argc, char **argv)
{
diff --git a/lib/libfrr.c b/lib/libfrr.c
index 6b7579712..07e2eafec 100644
--- a/lib/libfrr.c
+++ b/lib/libfrr.c
@@ -33,10 +33,10 @@
#include "frrscript.h"
#include "systemd.h"
-DEFINE_HOOK(frr_early_init, (struct event_master * tm), (tm));
-DEFINE_HOOK(frr_late_init, (struct event_master * tm), (tm));
-DEFINE_HOOK(frr_config_pre, (struct event_master * tm), (tm));
-DEFINE_HOOK(frr_config_post, (struct event_master * tm), (tm));
+DEFINE_HOOK(frr_early_init, (struct event_loop * tm), (tm));
+DEFINE_HOOK(frr_late_init, (struct event_loop * tm), (tm));
+DEFINE_HOOK(frr_config_pre, (struct event_loop * tm), (tm));
+DEFINE_HOOK(frr_config_post, (struct event_loop * tm), (tm));
DEFINE_KOOH(frr_early_fini, (), ());
DEFINE_KOOH(frr_fini, (), ());
@@ -696,8 +696,8 @@ static void _err_print(const void *cookie, const char *errstr)
fprintf(stderr, "%s: %s\n", prefix, errstr);
}
-static struct event_master *master;
-struct event_master *frr_init(void)
+static struct event_loop *master;
+struct event_loop *frr_init(void)
{
struct option_chain *oc;
struct log_arg *log_arg;
@@ -1139,7 +1139,7 @@ void frr_detach(void)
frr_check_detach();
}
-void frr_run(struct event_master *master)
+void frr_run(struct event_loop *master)
{
char instanceinfo[64] = "";
diff --git a/lib/libfrr.h b/lib/libfrr.h
index 3043d6b3f..a60580e1d 100644
--- a/lib/libfrr.h
+++ b/lib/libfrr.h
@@ -133,22 +133,22 @@ extern int frr_getopt(int argc, char *const argv[], int *longindex);
extern __attribute__((__noreturn__)) void frr_help_exit(int status);
-extern struct event_master *frr_init(void);
+extern struct event_loop *frr_init(void);
extern const char *frr_get_progname(void);
extern enum frr_cli_mode frr_get_cli_mode(void);
extern uint32_t frr_get_fd_limit(void);
extern bool frr_is_startup_fd(int fd);
/* call order of these hooks is as ordered here */
-DECLARE_HOOK(frr_early_init, (struct event_master * tm), (tm));
-DECLARE_HOOK(frr_late_init, (struct event_master * tm), (tm));
+DECLARE_HOOK(frr_early_init, (struct event_loop * tm), (tm));
+DECLARE_HOOK(frr_late_init, (struct event_loop * tm), (tm));
/* fork() happens between late_init and config_pre */
-DECLARE_HOOK(frr_config_pre, (struct event_master * tm), (tm));
-DECLARE_HOOK(frr_config_post, (struct event_master * tm), (tm));
+DECLARE_HOOK(frr_config_pre, (struct event_loop * tm), (tm));
+DECLARE_HOOK(frr_config_post, (struct event_loop * tm), (tm));
extern void frr_config_fork(void);
-extern void frr_run(struct event_master *master);
+extern void frr_run(struct event_loop *master);
extern void frr_detach(void);
extern bool frr_zclient_addr(struct sockaddr_storage *sa, socklen_t *sa_len,
diff --git a/lib/libfrr_trace.h b/lib/libfrr_trace.h
index 5a957d4c4..4d25f5580 100644
--- a/lib/libfrr_trace.h
+++ b/lib/libfrr_trace.h
@@ -73,7 +73,7 @@ TRACEPOINT_EVENT(
TRACEPOINT_LOGLEVEL(frr_libfrr, hash_release, TRACE_INFO)
#define THREAD_SCHEDULE_ARGS \
- TP_ARGS(struct event_master *, master, const char *, funcname, \
+ TP_ARGS(struct event_loop *, master, const char *, funcname, \
const char *, schedfrom, int, fromln, struct event **, \
thread_ptr, int, fd, int, val, void *, arg, long, time)
diff --git a/lib/mgmt_be_client.c b/lib/mgmt_be_client.c
index 4445c2b49..c35399cb5 100644
--- a/lib/mgmt_be_client.c
+++ b/lib/mgmt_be_client.c
@@ -105,7 +105,7 @@ DECLARE_LIST(mgmt_be_txns, struct mgmt_be_txn_ctx, list_linkage);
struct mgmt_be_client_ctx {
int conn_fd;
- struct event_master *tm;
+ struct event_loop *tm;
struct event *conn_retry_tmr;
struct event *conn_read_ev;
struct event *conn_write_ev;
@@ -1106,7 +1106,7 @@ extern struct nb_config *running_config;
* Initialize library and try connecting with MGMTD.
*/
uintptr_t mgmt_be_client_lib_init(struct mgmt_be_client_params *params,
- struct event_master *master_thread)
+ struct event_loop *master_thread)
{
assert(master_thread && params && strlen(params->name)
&& !mgmt_be_client_ctx.tm);
diff --git a/lib/mgmt_be_client.h b/lib/mgmt_be_client.h
index 2cb90478d..db427457a 100644
--- a/lib/mgmt_be_client.h
+++ b/lib/mgmt_be_client.h
@@ -189,7 +189,7 @@ mgmt_be_client_name2id(const char *name)
* Backend client lib handler (nothing but address of mgmt_be_client_ctx)
*/
extern uintptr_t mgmt_be_client_lib_init(struct mgmt_be_client_params *params,
- struct event_master *master_thread);
+ struct event_loop *master_thread);
/*
* Subscribe with MGMTD for one or more YANG subtree(s).
diff --git a/lib/mgmt_fe_client.c b/lib/mgmt_fe_client.c
index a54de4244..57c1961ff 100644
--- a/lib/mgmt_fe_client.c
+++ b/lib/mgmt_fe_client.c
@@ -49,7 +49,7 @@ DEFINE_MTYPE_STATIC(LIB, MGMTD_FE_SESSION, "MGMTD Frontend session");
struct mgmt_fe_client_ctx {
int conn_fd;
- struct event_master *tm;
+ struct event_loop *tm;
struct event *conn_retry_tmr;
struct event *conn_read_ev;
struct event *conn_write_ev;
@@ -784,7 +784,7 @@ static void mgmt_fe_client_schedule_conn_retry(
* Initialize library and try connecting with MGMTD.
*/
uintptr_t mgmt_fe_client_lib_init(struct mgmt_fe_client_params *params,
- struct event_master *master_thread)
+ struct event_loop *master_thread)
{
assert(master_thread && params && strlen(params->name)
&& !mgmt_fe_client_ctx.tm);
diff --git a/lib/mgmt_fe_client.h b/lib/mgmt_fe_client.h
index 2761b4fda..2269a72ac 100644
--- a/lib/mgmt_fe_client.h
+++ b/lib/mgmt_fe_client.h
@@ -131,7 +131,7 @@ struct mgmt_fe_client_params {
* Frontend client lib handler (nothing but address of mgmt_fe_client_ctx)
*/
extern uintptr_t mgmt_fe_client_lib_init(struct mgmt_fe_client_params *params,
- struct event_master *master_thread);
+ struct event_loop *master_thread);
/*
* Create a new Session for a Frontend Client connection.
diff --git a/lib/northbound.c b/lib/northbound.c
index 28952bb26..307cf0fb4 100644
--- a/lib/northbound.c
+++ b/lib/northbound.c
@@ -2685,7 +2685,7 @@ void nb_validate_callbacks(void)
}
-void nb_init(struct event_master *tm,
+void nb_init(struct event_loop *tm,
const struct frr_yang_module_info *const modules[],
size_t nmodules, bool db_enabled)
{
diff --git a/lib/northbound.h b/lib/northbound.h
index c29102257..59703363b 100644
--- a/lib/northbound.h
+++ b/lib/northbound.h
@@ -1478,7 +1478,7 @@ void nb_validate_callbacks(void);
* db_enabled
* Set this to record the transactions in the transaction log.
*/
-extern void nb_init(struct event_master *tm,
+extern void nb_init(struct event_loop *tm,
const struct frr_yang_module_info *const modules[],
size_t nmodules, bool db_enabled);
diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c
index f480182c7..5cf5f93b4 100644
--- a/lib/northbound_cli.c
+++ b/lib/northbound_cli.c
@@ -29,7 +29,7 @@ struct debug nb_dbg_events = {0, "Northbound events"};
struct debug nb_dbg_libyang = {0, "libyang debugging"};
struct nb_config *vty_shared_candidate_config;
-static struct event_master *master;
+static struct event_loop *master;
static void vty_show_nb_errors(struct vty *vty, int error, const char *errmsg)
{
@@ -1876,7 +1876,7 @@ static const struct cmd_variable_handler yang_var_handlers[] = {
.completions = yang_translator_autocomplete},
{.completions = NULL}};
-void nb_cli_init(struct event_master *tm)
+void nb_cli_init(struct event_loop *tm)
{
master = tm;
diff --git a/lib/northbound_cli.h b/lib/northbound_cli.h
index 630fbe12f..c8f8a8481 100644
--- a/lib/northbound_cli.h
+++ b/lib/northbound_cli.h
@@ -137,7 +137,7 @@ extern void nb_cli_show_config_prepare(struct nb_config *config,
extern void nb_cli_confirmed_commit_clean(struct vty *vty);
extern int nb_cli_confirmed_commit_rollback(struct vty *vty);
extern void nb_cli_install_default(int node);
-extern void nb_cli_init(struct event_master *tm);
+extern void nb_cli_init(struct event_loop *tm);
extern void nb_cli_terminate(void);
#ifdef __cplusplus
diff --git a/lib/northbound_confd.c b/lib/northbound_confd.c
index 0e01b0603..34406a110 100644
--- a/lib/northbound_confd.c
+++ b/lib/northbound_confd.c
@@ -23,7 +23,7 @@ DEFINE_MTYPE_STATIC(LIB, CONFD, "ConfD module");
static struct debug nb_dbg_client_confd = {0, "Northbound client: ConfD"};
-static struct event_master *master;
+static struct event_loop *master;
static struct sockaddr confd_addr;
static int cdb_sub_sock, dp_ctl_sock, dp_worker_sock;
static struct event *t_cdb_sub, *t_dp_ctl, *t_dp_worker;
@@ -1465,7 +1465,7 @@ static int frr_confd_finish(void)
return 0;
}
-static int frr_confd_module_late_init(struct event_master *tm)
+static int frr_confd_module_late_init(struct event_loop *tm)
{
master = tm;
diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp
index fcea77488..5ce80fb5f 100644
--- a/lib/northbound_grpc.cpp
+++ b/lib/northbound_grpc.cpp
@@ -38,7 +38,7 @@
*/
static bool nb_dbg_client_grpc = 0;
-static struct event_master *main_master;
+static struct event_loop *main_master;
static struct frr_pthread *fpt;
@@ -1298,7 +1298,7 @@ error:
flog_err(EC_LIB_GRPC_INIT, "failed to initialize the gRPC module");
}
-static int frr_grpc_module_late_init(struct event_master *tm)
+static int frr_grpc_module_late_init(struct event_loop *tm)
{
main_master = tm;
hook_register(frr_fini, frr_grpc_finish);
diff --git a/lib/northbound_sysrepo.c b/lib/northbound_sysrepo.c
index 2cfee9de6..86105d2e7 100644
--- a/lib/northbound_sysrepo.c
+++ b/lib/northbound_sysrepo.c
@@ -23,7 +23,7 @@ DEFINE_MTYPE_STATIC(LIB, SYSREPO, "Sysrepo module");
static struct debug nb_dbg_client_sysrepo = {0, "Northbound client: Sysrepo"};
-static struct event_master *master;
+static struct event_loop *master;
static sr_session_ctx_t *session;
static sr_conn_ctx_t *connection;
static struct nb_transaction *transaction;
@@ -721,7 +721,7 @@ static int frr_sr_finish(void)
return 0;
}
-static int frr_sr_module_config_loaded(struct event_master *tm)
+static int frr_sr_module_config_loaded(struct event_loop *tm)
{
master = tm;
@@ -736,7 +736,7 @@ static int frr_sr_module_config_loaded(struct event_master *tm)
return 0;
}
-static int frr_sr_module_late_init(struct event_master *tm)
+static int frr_sr_module_late_init(struct event_loop *tm)
{
frr_sr_cli_init();
diff --git a/lib/pullwr.c b/lib/pullwr.c
index 4dae87314..3967eb587 100644
--- a/lib/pullwr.c
+++ b/lib/pullwr.c
@@ -16,7 +16,7 @@
struct pullwr {
int fd;
- struct event_master *tm;
+ struct event_loop *tm;
/* writer == NULL <=> we're idle */
struct event *writer;
@@ -40,7 +40,7 @@ DEFINE_MTYPE_STATIC(LIB, PULLWR_BUF, "pull-driven write buffer");
static void pullwr_run(struct event *t);
-struct pullwr *_pullwr_new(struct event_master *tm, int fd, void *arg,
+struct pullwr *_pullwr_new(struct event_loop *tm, int fd, void *arg,
void (*fill)(void *, struct pullwr *),
void (*err)(void *, struct pullwr *, bool))
{
diff --git a/lib/pullwr.h b/lib/pullwr.h
index fee4c9cd6..a589389c3 100644
--- a/lib/pullwr.h
+++ b/lib/pullwr.h
@@ -45,7 +45,7 @@ struct pullwr;
* and released with pullwr_del(). This can be done from inside the callback,
* the pullwr code holds no more references on it when calling err().
*/
-extern struct pullwr *_pullwr_new(struct event_master *tm, int fd, void *arg,
+extern struct pullwr *_pullwr_new(struct event_loop *tm, int fd, void *arg,
void (*fill)(void *, struct pullwr *),
void (*err)(void *, struct pullwr *,
bool eof));
diff --git a/lib/resolver.c b/lib/resolver.c
index e5932299f..d5915040b 100644
--- a/lib/resolver.c
+++ b/lib/resolver.c
@@ -23,7 +23,7 @@ XREF_SETUP();
struct resolver_state {
ares_channel channel;
- struct event_master *master;
+ struct event_loop *master;
struct event *timeout;
};
@@ -314,7 +314,7 @@ static int resolver_config_write_debug(struct vty *vty)
}
-void resolver_init(struct event_master *tm)
+void resolver_init(struct event_loop *tm)
{
struct ares_options ares_opts;
diff --git a/lib/resolver.h b/lib/resolver.h
index 98da02c22..aba4e16c0 100644
--- a/lib/resolver.h
+++ b/lib/resolver.h
@@ -22,7 +22,7 @@ struct resolver_query {
struct event *literal_cb;
};
-void resolver_init(struct event_master *tm);
+void resolver_init(struct event_loop *tm);
void resolver_resolve(struct resolver_query *query, int af, vrf_id_t vrf_id,
const char *hostname,
void (*cb)(struct resolver_query *, const char *, int,
diff --git a/lib/sigevent.c b/lib/sigevent.c
index 88c010e57..3cd65eb80 100644
--- a/lib/sigevent.c
+++ b/lib/sigevent.c
@@ -331,8 +331,7 @@ static void trap_default_signals(void)
}
}
-void signal_init(struct event_master *m, int sigc,
- struct frr_signal_t signals[])
+void signal_init(struct event_loop *m, int sigc, struct frr_signal_t signals[])
{
int i = 0;
diff --git a/lib/sigevent.h b/lib/sigevent.h
index 8eef32853..34753e1fd 100644
--- a/lib/sigevent.h
+++ b/lib/sigevent.h
@@ -25,12 +25,12 @@ struct frr_signal_t {
/* initialise sigevent system
* takes:
- * - pointer to valid struct event_master
+ * - pointer to valid struct event_loop
* - number of elements in passed in signals array
* - array of frr_signal_t's describing signals to handle
* and handlers to use for each signal
*/
-extern void signal_init(struct event_master *m, int sigc,
+extern void signal_init(struct event_loop *m, int sigc,
struct frr_signal_t *signals);
diff --git a/lib/smux.h b/lib/smux.h
index d83a34b30..366bf6fea 100644
--- a/lib/smux.h
+++ b/lib/smux.h
@@ -99,7 +99,7 @@ struct index_oid {
*/
extern bool smux_enabled(void);
-extern void smux_init(struct event_master *tm);
+extern void smux_init(struct event_loop *tm);
extern void smux_agentx_enable(void);
extern void smux_register_mib(const char *, struct variable *, size_t, int,
oid[], size_t);
diff --git a/lib/spf_backoff.c b/lib/spf_backoff.c
index b363f6f0b..ab9c94445 100644
--- a/lib/spf_backoff.c
+++ b/lib/spf_backoff.c
@@ -37,7 +37,7 @@ enum spf_backoff_state {
};
struct spf_backoff {
- struct event_master *m;
+ struct event_loop *m;
/* Timers as per draft */
long init_delay;
@@ -70,7 +70,7 @@ static const char *spf_backoff_state2str(enum spf_backoff_state state)
return "???";
}
-struct spf_backoff *spf_backoff_new(struct event_master *m, const char *name,
+struct spf_backoff *spf_backoff_new(struct event_loop *m, const char *name,
long init_delay, long short_delay,
long long_delay, long holddown,
long timetolearn)
diff --git a/lib/spf_backoff.h b/lib/spf_backoff.h
index c550c66c8..83f1b76ad 100644
--- a/lib/spf_backoff.h
+++ b/lib/spf_backoff.h
@@ -18,10 +18,10 @@ extern "C" {
#endif
struct spf_backoff;
-struct event_master;
+struct event_loop;
struct vty;
-struct spf_backoff *spf_backoff_new(struct event_master *m, const char *name,
+struct spf_backoff *spf_backoff_new(struct event_loop *m, const char *name,
long init_delay, long short_delay,
long long_delay, long holddown,
long timetolearn);
diff --git a/lib/systemd.c b/lib/systemd.c
index 7d8421f33..bd364ad66 100644
--- a/lib/systemd.c
+++ b/lib/systemd.c
@@ -63,7 +63,7 @@ void systemd_send_stopping(void)
systemd_send_information("STOPPING=1");
}
-static struct event_master *systemd_master = NULL;
+static struct event_loop *systemd_master = NULL;
static void systemd_send_watchdog(struct event *t)
{
@@ -74,7 +74,7 @@ static void systemd_send_watchdog(struct event *t)
watchdog_msec, NULL);
}
-void systemd_send_started(struct event_master *m)
+void systemd_send_started(struct event_loop *m)
{
assert(m != NULL);
diff --git a/lib/systemd.h b/lib/systemd.h
index c8fb328ad..ba2461b8a 100644
--- a/lib/systemd.h
+++ b/lib/systemd.h
@@ -21,11 +21,11 @@ extern bool sd_stderr_is_journal;
void systemd_send_stopping(void);
/*
- * master - The struct event_master * to use to schedule ourself
+ * master - The struct event_loop * to use to schedule ourself
* the_process - Should we send watchdog if we are not the requested
* process?
*/
-void systemd_send_started(struct event_master *master);
+void systemd_send_started(struct event_loop *master);
/*
* status - A status string to send to systemd
diff --git a/lib/vty.c b/lib/vty.c
index e2130e5d6..7ab82b155 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2801,7 +2801,7 @@ int vty_config_node_exit(struct vty *vty)
}
/* Master of the threads. */
-static struct event_master *vty_master;
+static struct event_loop *vty_master;
static void vty_event_serv(enum vty_event event, struct vty_serv *vty_serv)
{
@@ -3655,7 +3655,7 @@ int vty_mgmt_send_get_data(struct vty *vty, Mgmtd__DatastoreId datastore,
}
/* Install vty's own commands like `who' command. */
-void vty_init(struct event_master *master_thread, bool do_command_logging)
+void vty_init(struct event_loop *master_thread, bool do_command_logging)
{
/* For further configuration read, preserve current directory. */
vty_save_cwd();
diff --git a/lib/vty.h b/lib/vty.h
index f89f89b62..438bcfc92 100644
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -337,7 +337,7 @@ struct vty_arg {
extern struct nb_config *vty_mgmt_candidate_config;
/* Prototypes. */
-extern void vty_init(struct event_master *m, bool do_command_logging);
+extern void vty_init(struct event_loop *m, bool do_command_logging);
extern void vty_init_vtysh(void);
extern void vty_terminate(void);
extern void vty_reset(void);
diff --git a/lib/wheel.c b/lib/wheel.c
index 02f27e313..d9362bac4 100644
--- a/lib/wheel.c
+++ b/lib/wheel.c
@@ -60,7 +60,7 @@ static void wheel_timer_thread(struct event *t)
event_execute(wheel->master, wheel_timer_thread_helper, wheel, 0);
}
-struct timer_wheel *wheel_init(struct event_master *master, int period,
+struct timer_wheel *wheel_init(struct event_loop *master, int period,
size_t slots,
unsigned int (*slot_key)(const void *),
void (*slot_run)(void *), const char *run_name)
diff --git a/lib/wheel.h b/lib/wheel.h
index 8b4a83115..0d9ac1002 100644
--- a/lib/wheel.h
+++ b/lib/wheel.h
@@ -13,7 +13,7 @@ extern "C" {
struct timer_wheel {
char *name;
- struct event_master *master;
+ struct event_loop *master;
int slots;
long long curr_slot;
unsigned int period;
@@ -66,7 +66,7 @@ struct timer_wheel {
* and cause significant amount of time handling thread events instead
* of running your code.
*/
-struct timer_wheel *wheel_init(struct event_master *master, int period,
+struct timer_wheel *wheel_init(struct event_loop *master, int period,
size_t slots,
unsigned int (*slot_key)(const void *),
void (*slot_run)(void *), const char *run_name);
diff --git a/lib/workqueue.c b/lib/workqueue.c
index 1da7db682..3b677e008 100644
--- a/lib/workqueue.c
+++ b/lib/workqueue.c
@@ -59,8 +59,7 @@ static void work_queue_item_remove(struct work_queue *wq,
}
/* create new work queue */
-struct work_queue *work_queue_new(struct event_master *m,
- const char *queue_name)
+struct work_queue *work_queue_new(struct event_loop *m, const char *queue_name)
{
struct work_queue *new;
diff --git a/lib/workqueue.h b/lib/workqueue.h
index ca29ae3d1..5d84739d5 100644
--- a/lib/workqueue.h
+++ b/lib/workqueue.h
@@ -47,7 +47,7 @@ struct work_queue {
/* Everything but the specification struct is private
* the following may be read
*/
- struct event_master *master; /* thread master */
+ struct event_loop *master; /* thread master */
struct event *thread; /* thread, if one is active */
char *name; /* work queue name */
@@ -137,7 +137,7 @@ static inline void work_queue_item_dequeue(struct work_queue *wq,
* user must fill in the spec of the returned work queue before adding
* anything to it
*/
-extern struct work_queue *work_queue_new(struct event_master *m,
+extern struct work_queue *work_queue_new(struct event_loop *m,
const char *queue_name);
/* destroy work queue */
diff --git a/lib/zclient.c b/lib/zclient.c
index 0e9ce3d63..d708a711a 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -51,7 +51,7 @@ socklen_t zclient_addr_len;
static int zclient_debug;
/* Allocate zclient structure. */
-struct zclient *zclient_new(struct event_master *master,
+struct zclient *zclient_new(struct event_loop *master,
struct zclient_options *opt,
zclient_handler *const *handlers, size_t n_handlers)
{
diff --git a/lib/zclient.h b/lib/zclient.h
index 0a20af8c3..367e5b147 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -290,7 +290,7 @@ typedef int (zclient_handler)(ZAPI_CALLBACK_ARGS);
/* Structure for the zebra client. */
struct zclient {
/* The thread master we schedule ourselves on */
- struct event_master *master;
+ struct event_loop *master;
/* Privileges to change socket values */
struct zebra_privs_t *privs;
@@ -862,7 +862,7 @@ int zclient_neigh_ip_encode(struct stream *s, uint16_t cmd, union sockunion *in,
extern uint32_t zclient_get_nhg_start(uint32_t proto);
-extern struct zclient *zclient_new(struct event_master *m,
+extern struct zclient *zclient_new(struct event_loop *m,
struct zclient_options *opt,
zclient_handler *const *handlers,
size_t n_handlers);
diff --git a/lib/zlog_5424.h b/lib/zlog_5424.h
index 52b5f6821..06525c004 100644
--- a/lib/zlog_5424.h
+++ b/lib/zlog_5424.h
@@ -14,7 +14,7 @@
#include "qobj.h"
struct event;
-struct event_master;
+struct event_loop;
enum zlog_5424_dst {
/* can be used to disable a target temporarily */
@@ -78,7 +78,7 @@ struct zlog_cfg_5424 {
*/
/* sockets only - read handler to reconnect on errors */
- struct event_master *master;
+ struct event_loop *master;
struct event *t_reconnect;
unsigned int reconn_backoff, reconn_backoff_cur, reconn_backoff_max;
int sock_type;
diff --git a/lib/zlog_5424_cli.c b/lib/zlog_5424_cli.c
index 31b3390eb..3003df542 100644
--- a/lib/zlog_5424_cli.c
+++ b/lib/zlog_5424_cli.c
@@ -28,7 +28,7 @@ DECLARE_RBTREE_UNIQ(targets, struct zlog_cfg_5424_user, targets_item,
DEFINE_QOBJ_TYPE(zlog_cfg_5424_user);
static struct targets_head targets = INIT_RBTREE_UNIQ(targets);
-static struct event_master *log_5424_master;
+static struct event_loop *log_5424_master;
static void clear_dst(struct zlog_cfg_5424_user *cfg);
@@ -948,7 +948,7 @@ void log_5424_cmd_init(void)
/* hooks */
-static int log_5424_early_init(struct event_master *master);
+static int log_5424_early_init(struct event_loop *master);
static int log_5424_rotate(void);
static int log_5424_fini(void);
@@ -959,7 +959,7 @@ __attribute__((_CONSTRUCTOR(475))) static void zlog_5424_startup_init(void)
hook_register(frr_fini, log_5424_fini);
}
-static int log_5424_early_init(struct event_master *master)
+static int log_5424_early_init(struct event_loop *master)
{
log_5424_master = master;
diff --git a/mgmtd/mgmt.c b/mgmtd/mgmt.c
index f810a865a..a5c0eb34a 100644
--- a/mgmtd/mgmt.c
+++ b/mgmtd/mgmt.c
@@ -27,7 +27,7 @@ static struct mgmt_master mgmt_master;
/* MGMTD process wide configuration pointer to export. */
struct mgmt_master *mm;
-void mgmt_master_init(struct event_master *master, const int buffer_size)
+void mgmt_master_init(struct event_loop *master, const int buffer_size)
{
memset(&mgmt_master, 0, sizeof(struct mgmt_master));
diff --git a/mgmtd/mgmt.h b/mgmtd/mgmt.h
index e3111b437..4d186c176 100644
--- a/mgmtd/mgmt.h
+++ b/mgmtd/mgmt.h
@@ -34,7 +34,7 @@ struct mgmt_txn_ctx;
* MGMTD master for system wide configurations and variables.
*/
struct mgmt_master {
- struct event_master *master;
+ struct event_loop *master;
/* How big should we set the socket buffer size */
uint32_t socket_buffer;
@@ -95,8 +95,7 @@ extern time_t mgmt_clock(void);
extern int mgmt_config_write(struct vty *vty);
-extern void mgmt_master_init(struct event_master *master,
- const int buffer_size);
+extern void mgmt_master_init(struct event_loop *master, const int buffer_size);
extern void mgmt_init(void);
extern void mgmt_vty_init(void);
diff --git a/mgmtd/mgmt_be_adapter.c b/mgmtd/mgmt_be_adapter.c
index a4ba75869..c85b3549b 100644
--- a/mgmtd/mgmt_be_adapter.c
+++ b/mgmtd/mgmt_be_adapter.c
@@ -106,7 +106,7 @@ static struct mgmt_be_xpath_regexp_map
mgmt_xpath_map[MGMTD_BE_MAX_NUM_XPATH_MAP];
static int mgmt_num_xpath_maps;
-static struct event_master *mgmt_be_adapter_tm;
+static struct event_loop *mgmt_be_adapter_tm;
static struct mgmt_be_adapters_head mgmt_be_adapters;
@@ -805,7 +805,7 @@ extern void mgmt_be_adapter_unlock(struct mgmt_be_client_adapter **adapter)
*adapter = NULL;
}
-int mgmt_be_adapter_init(struct event_master *tm)
+int mgmt_be_adapter_init(struct event_loop *tm)
{
if (!mgmt_be_adapter_tm) {
mgmt_be_adapter_tm = tm;
diff --git a/mgmtd/mgmt_be_adapter.h b/mgmtd/mgmt_be_adapter.h
index 7cf7090e0..88d54a784 100644
--- a/mgmtd/mgmt_be_adapter.h
+++ b/mgmtd/mgmt_be_adapter.h
@@ -92,7 +92,7 @@ struct mgmt_be_client_subscr_info {
};
/* Initialise backend adapter module. */
-extern int mgmt_be_adapter_init(struct event_master *tm);
+extern int mgmt_be_adapter_init(struct event_loop *tm);
/* Destroy the backend adapter module. */
extern void mgmt_be_adapter_destroy(void);
diff --git a/mgmtd/mgmt_be_server.c b/mgmtd/mgmt_be_server.c
index c985e2d0b..0fa7ddd6d 100644
--- a/mgmtd/mgmt_be_server.c
+++ b/mgmtd/mgmt_be_server.c
@@ -29,7 +29,7 @@
#endif /* REDIRECT_DEBUG_TO_STDERR */
static int mgmt_be_listen_fd = -1;
-static struct event_master *mgmt_be_listen_tm;
+static struct event_loop *mgmt_be_listen_tm;
static struct event *mgmt_be_listen_ev;
static void mgmt_be_server_register_event(enum mgmt_be_event event);
@@ -126,7 +126,7 @@ mgmt_be_server_start_failed:
exit(-1);
}
-int mgmt_be_server_init(struct event_master *master)
+int mgmt_be_server_init(struct event_loop *master)
{
if (mgmt_be_listen_tm) {
MGMTD_BE_SRVR_DBG("MGMTD Backend Server already running!");
diff --git a/mgmtd/mgmt_be_server.h b/mgmtd/mgmt_be_server.h
index 3d0594d16..63731a0ef 100644
--- a/mgmtd/mgmt_be_server.h
+++ b/mgmtd/mgmt_be_server.h
@@ -12,7 +12,7 @@
#define MGMTD_BE_MAX_CONN 32
/* Initialise backend server */
-extern int mgmt_be_server_init(struct event_master *master);
+extern int mgmt_be_server_init(struct event_loop *master);
/* Destroy backend server */
extern void mgmt_be_server_destroy(void);
diff --git a/mgmtd/mgmt_fe_adapter.c b/mgmtd/mgmt_fe_adapter.c
index bb0ca4af0..ba4ac9f08 100644
--- a/mgmtd/mgmt_fe_adapter.c
+++ b/mgmtd/mgmt_fe_adapter.c
@@ -62,7 +62,7 @@ DECLARE_LIST(mgmt_fe_sessions, struct mgmt_fe_session_ctx, list_linkage);
#define FOREACH_SESSION_IN_LIST(adapter, session) \
frr_each_safe (mgmt_fe_sessions, &(adapter)->fe_sessions, (session))
-static struct event_master *mgmt_fe_adapter_tm;
+static struct event_loop *mgmt_fe_adapter_tm;
static struct mgmt_master *mgmt_fe_adapter_mm;
static struct mgmt_fe_adapters_head mgmt_fe_adapters;
@@ -1549,7 +1549,7 @@ mgmt_fe_adapter_unlock(struct mgmt_fe_client_adapter **adapter)
*adapter = NULL;
}
-int mgmt_fe_adapter_init(struct event_master *tm, struct mgmt_master *mm)
+int mgmt_fe_adapter_init(struct event_loop *tm, struct mgmt_master *mm)
{
if (!mgmt_fe_adapter_tm) {
mgmt_fe_adapter_tm = tm;
diff --git a/mgmtd/mgmt_fe_adapter.h b/mgmtd/mgmt_fe_adapter.h
index e1af5d0f2..6f7283703 100644
--- a/mgmtd/mgmt_fe_adapter.h
+++ b/mgmtd/mgmt_fe_adapter.h
@@ -82,8 +82,7 @@ struct mgmt_fe_client_adapter {
DECLARE_LIST(mgmt_fe_adapters, struct mgmt_fe_client_adapter, list_linkage);
/* Initialise frontend adapter module */
-extern int mgmt_fe_adapter_init(struct event_master *tm,
- struct mgmt_master *cm);
+extern int mgmt_fe_adapter_init(struct event_loop *tm, struct mgmt_master *cm);
/* Destroy frontend adapter module */
extern void mgmt_fe_adapter_destroy(void);
diff --git a/mgmtd/mgmt_fe_server.c b/mgmtd/mgmt_fe_server.c
index 5e5f32cde..6097c23aa 100644
--- a/mgmtd/mgmt_fe_server.c
+++ b/mgmtd/mgmt_fe_server.c
@@ -29,7 +29,7 @@
#endif /* REDIRECT_DEBUG_TO_STDERR */
static int mgmt_fe_listen_fd = -1;
-static struct event_master *mgmt_fe_listen_tm;
+static struct event_loop *mgmt_fe_listen_tm;
static struct event *mgmt_fe_listen_ev;
static void mgmt_fe_server_register_event(enum mgmt_fe_event event);
@@ -126,7 +126,7 @@ mgmt_fe_server_start_failed:
exit(-1);
}
-int mgmt_fe_server_init(struct event_master *master)
+int mgmt_fe_server_init(struct event_loop *master)
{
if (mgmt_fe_listen_tm) {
MGMTD_FE_SRVR_DBG("MGMTD Frontend Server already running!");
diff --git a/mgmtd/mgmt_fe_server.h b/mgmtd/mgmt_fe_server.h
index 0b0171c38..6f676ba4d 100644
--- a/mgmtd/mgmt_fe_server.h
+++ b/mgmtd/mgmt_fe_server.h
@@ -12,7 +12,7 @@
#define MGMTD_FE_MAX_CONN 32
/* Initialise frontend server */
-extern int mgmt_fe_server_init(struct event_master *master);
+extern int mgmt_fe_server_init(struct event_loop *master);
/* Destroy frontend server */
extern void mgmt_fe_server_destroy(void);
diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c
index b0b726b58..b5f61d3bc 100644
--- a/mgmtd/mgmt_txn.c
+++ b/mgmtd/mgmt_txn.c
@@ -286,7 +286,7 @@ static int
mgmt_txn_send_be_txn_delete(struct mgmt_txn_ctx *txn,
struct mgmt_be_client_adapter *adapter);
-static struct event_master *mgmt_txn_tm;
+static struct event_loop *mgmt_txn_tm;
static struct mgmt_master *mgmt_txn_mm;
static void mgmt_txn_register_event(struct mgmt_txn_ctx *txn,
@@ -2260,7 +2260,7 @@ static void mgmt_txn_register_event(struct mgmt_txn_ctx *txn,
}
}
-int mgmt_txn_init(struct mgmt_master *mm, struct event_master *tm)
+int mgmt_txn_init(struct mgmt_master *mm, struct event_loop *tm)
{
if (mgmt_txn_mm || mgmt_txn_tm)
assert(!"MGMTD TXN: Call txn_init() only once");
diff --git a/mgmtd/mgmt_txn.h b/mgmtd/mgmt_txn.h
index 48ac61913..be781ab95 100644
--- a/mgmtd/mgmt_txn.h
+++ b/mgmtd/mgmt_txn.h
@@ -65,7 +65,7 @@ static inline const char *mgmt_txn_type2str(enum mgmt_txn_type type)
}
/* Initialise transaction module. */
-extern int mgmt_txn_init(struct mgmt_master *cm, struct event_master *tm);
+extern int mgmt_txn_init(struct mgmt_master *cm, struct event_loop *tm);
/* Destroy the transaction module. */
extern void mgmt_txn_destroy(void);
diff --git a/nhrpd/nhrp_main.c b/nhrpd/nhrp_main.c
index 7b5e7a6ea..f34020bc6 100644
--- a/nhrpd/nhrp_main.c
+++ b/nhrpd/nhrp_main.c
@@ -28,7 +28,7 @@ DEFINE_MGROUP(NHRPD, "NHRP");
unsigned int debug_flags = 0;
-struct event_master *master;
+struct event_loop *master;
struct timeval current_time;
/* nhrpd options. */
diff --git a/nhrpd/nhrpd.h b/nhrpd/nhrpd.h
index 10e881235..1421f0fc3 100644
--- a/nhrpd/nhrpd.h
+++ b/nhrpd/nhrpd.h
@@ -19,7 +19,7 @@ DECLARE_MGROUP(NHRPD);
#define NHRP_VTY_PORT 2610
#define NHRP_DEFAULT_CONFIG "nhrpd.conf"
-extern struct event_master *master;
+extern struct event_loop *master;
enum { NHRP_OK = 0,
NHRP_ERR_FAIL,
diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c
index 23d43408f..599ee76a4 100644
--- a/ospf6d/ospf6_main.c
+++ b/ospf6d/ospf6_main.c
@@ -62,7 +62,7 @@ struct zebra_privs_t ospf6d_privs = {
struct option longopts[] = {{0}};
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
static void __attribute__((noreturn)) ospf6_exit(int status)
{
diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c
index 9aee6dddc..f88667bfd 100644
--- a/ospf6d/ospf6_snmp.c
+++ b/ospf6d/ospf6_snmp.c
@@ -1383,7 +1383,7 @@ static int ospf6TrapIfStateChange(struct ospf6_interface *oi, int next_state,
}
/* Register OSPFv3-MIB. */
-static int ospf6_snmp_init(struct event_master *master)
+static int ospf6_snmp_init(struct event_loop *master)
{
smux_init(master);
REGISTER_MIB("OSPFv3MIB", ospfv3_variables, variable, ospfv3_oid);
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 5ad79711e..e8c7740a0 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -564,7 +564,7 @@ static void ospf6_disable(struct ospf6 *o)
}
}
-void ospf6_master_init(struct event_master *master)
+void ospf6_master_init(struct event_loop *master)
{
memset(&ospf6_master, 0, sizeof(ospf6_master));
diff --git a/ospf6d/ospf6_top.h b/ospf6d/ospf6_top.h
index 29badb0a9..8fdd29112 100644
--- a/ospf6d/ospf6_top.h
+++ b/ospf6d/ospf6_top.h
@@ -13,7 +13,7 @@ struct ospf6_master {
/* OSPFv3 instance. */
struct list *ospf6;
/* OSPFv3 thread master. */
- struct event_master *master;
+ struct event_loop *master;
};
/* ospf6->config_flags */
@@ -233,7 +233,7 @@ extern struct ospf6 *ospf6;
extern struct ospf6_master *om6;
/* prototypes */
-extern void ospf6_master_init(struct event_master *master);
+extern void ospf6_master_init(struct event_loop *master);
extern void install_element_ospf6_clear_process(void);
extern void ospf6_top_init(void);
extern void ospf6_delete(struct ospf6 *o);
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index 5ace3ca55..6b3d4955d 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -750,7 +750,7 @@ static zclient_handler *const ospf6_handlers[] = {
[ZEBRA_NEXTHOP_UPDATE] = ospf6_zebra_import_check_update,
};
-void ospf6_zebra_init(struct event_master *master)
+void ospf6_zebra_init(struct event_loop *master)
{
/* Allocate zebra structure. */
zclient = zclient_new(master, &zclient_options_default, ospf6_handlers,
diff --git a/ospf6d/ospf6_zebra.h b/ospf6d/ospf6_zebra.h
index 79864394a..9f41dfca9 100644
--- a/ospf6d/ospf6_zebra.h
+++ b/ospf6d/ospf6_zebra.h
@@ -39,7 +39,7 @@ extern void ospf6_zebra_redistribute(int, vrf_id_t vrf_id);
extern void ospf6_zebra_no_redistribute(int, vrf_id_t vrf_id);
#define ospf6_zebra_is_redistribute(type, vrf_id) \
vrf_bitmap_check(zclient->redist[AFI_IP6][type], vrf_id)
-extern void ospf6_zebra_init(struct event_master *tm);
+extern void ospf6_zebra_init(struct event_loop *tm);
extern void ospf6_zebra_import_default_route(struct ospf6 *ospf6, bool unreg);
extern void ospf6_zebra_add_discard(struct ospf6_route *request,
struct ospf6 *ospf6);
diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
index 1a6e7e07b..3700511fa 100644
--- a/ospf6d/ospf6d.c
+++ b/ospf6d/ospf6d.c
@@ -1375,7 +1375,7 @@ DEFUN(show_ipv6_ospf6_linkstate_detail, show_ipv6_ospf6_linkstate_detail_cmd,
}
/* Install ospf related commands. */
-void ospf6_init(struct event_master *master)
+void ospf6_init(struct event_loop *master)
{
ospf6_top_init();
ospf6_area_init();
diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h
index 1d9427252..89758b946 100644
--- a/ospf6d/ospf6d.h
+++ b/ospf6d/ospf6d.h
@@ -13,7 +13,7 @@
DECLARE_MGROUP(OSPF6D);
/* global variables */
-extern struct event_master *master;
+extern struct event_loop *master;
/* Historical for KAME. */
#ifndef IPV6_JOIN_GROUP
@@ -109,6 +109,6 @@ extern struct zebra_privs_t ospf6d_privs;
extern struct route_node *route_prev(struct route_node *node);
extern void ospf6_debug(void);
-extern void ospf6_init(struct event_master *master);
+extern void ospf6_init(struct event_loop *master);
#endif /* OSPF6D_H */
diff --git a/ospfclient/ospfclient.c b/ospfclient/ospfclient.c
index b884e0e0e..8e5a98230 100644
--- a/ospfclient/ospfclient.c
+++ b/ospfclient/ospfclient.c
@@ -51,7 +51,7 @@ struct zebra_privs_t ospfd_privs = {.user = NULL,
#define ASYNCPORT 4000
/* Master thread */
-struct event_master *master;
+struct event_loop *master;
/* Global variables */
struct ospf_apiclient *oclient;
diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c
index 2c154e8d0..7be3c1d2a 100644
--- a/ospfd/ospf_apiserver.c
+++ b/ospfd/ospf_apiserver.c
@@ -25,7 +25,7 @@
#include <sys/types.h>
-#include "ospfd/ospfd.h" /* for "struct event_master" */
+#include "ospfd/ospfd.h" /* for "struct event_loop" */
#include "ospfd/ospf_interface.h"
#include "ospfd/ospf_ism.h"
#include "ospfd/ospf_asbr.h"
diff --git a/ospfd/ospf_bfd.c b/ospfd/ospf_bfd.c
index 9b11a072c..3146656d6 100644
--- a/ospfd/ospf_bfd.c
+++ b/ospfd/ospf_bfd.c
@@ -310,7 +310,7 @@ DEFUN (no_ip_ospf_bfd,
return CMD_SUCCESS;
}
-void ospf_bfd_init(struct event_master *tm)
+void ospf_bfd_init(struct event_loop *tm)
{
bfd_protocol_integration_init(zclient, tm);
diff --git a/ospfd/ospf_bfd.h b/ospfd/ospf_bfd.h
index 462e554a6..d454f9c97 100644
--- a/ospfd/ospf_bfd.h
+++ b/ospfd/ospf_bfd.h
@@ -11,7 +11,7 @@
#include "ospfd/ospf_interface.h"
#include "json.h"
-extern void ospf_bfd_init(struct event_master *tm);
+extern void ospf_bfd_init(struct event_loop *tm);
extern void ospf_bfd_write_config(struct vty *vty,
const struct ospf_if_params *params);
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c
index 0dacee8c2..6bfba6cee 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -70,7 +70,7 @@ const struct option longopts[] = {
/* OSPFd program name */
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
#ifdef SUPPORT_OSPF_API
extern int ospf_apiserver_enable;
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index 35ae909ce..2982cc7d6 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -2525,7 +2525,7 @@ static int ospf_snmp_ism_change(struct ospf_interface *oi, int state,
}
/* Register OSPF2-MIB. */
-static int ospf_snmp_init(struct event_master *tm)
+static int ospf_snmp_init(struct event_loop *tm)
{
ospf_snmp_iflist = list_new();
ospf_snmp_vl_table = route_table_init();
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 232059add..92fb38f54 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -49,7 +49,7 @@ struct zclient *zclient = NULL;
static struct zclient *zclient_sync;
/* For registering threads. */
-extern struct event_master *master;
+extern struct event_loop *master;
/* Router-id update message from zebra. */
static int ospf_router_id_update_zebra(ZAPI_CALLBACK_ARGS)
@@ -2138,7 +2138,7 @@ static zclient_handler *const ospf_handlers[] = {
[ZEBRA_CLIENT_CLOSE_NOTIFY] = ospf_zebra_client_close_notify,
};
-void ospf_zebra_init(struct event_master *master, unsigned short instance)
+void ospf_zebra_init(struct event_loop *master, unsigned short instance)
{
/* Allocate zebra structure. */
zclient = zclient_new(master, &zclient_options_default, ospf_handlers,
diff --git a/ospfd/ospf_zebra.h b/ospfd/ospf_zebra.h
index 5634fef87..711b1e7a6 100644
--- a/ospfd/ospf_zebra.h
+++ b/ospfd/ospf_zebra.h
@@ -79,7 +79,7 @@ extern int ospf_distance_set(struct vty *, struct ospf *, const char *,
const char *, const char *);
extern int ospf_distance_unset(struct vty *, struct ospf *, const char *,
const char *, const char *);
-extern void ospf_zebra_init(struct event_master *m, unsigned short instance);
+extern void ospf_zebra_init(struct event_loop *m, unsigned short instance);
extern void ospf_zebra_vrf_register(struct ospf *ospf);
extern void ospf_zebra_vrf_deregister(struct ospf *ospf);
bool ospf_external_default_routemap_apply_walk(
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index 37d6c211c..2cdad9368 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -2140,7 +2140,7 @@ int ospf_nbr_nbma_poll_interval_unset(struct ospf *ospf, struct in_addr addr)
return 1;
}
-void ospf_master_init(struct event_master *master)
+void ospf_master_init(struct event_loop *master)
{
memset(&ospf_master, 0, sizeof(ospf_master));
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index 497ec7b1b..6727d802a 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -78,7 +78,7 @@ struct ospf_master {
struct list *ospf;
/* OSPF thread master. */
- struct event_master *master;
+ struct event_loop *master;
/* Various OSPF global configuration. */
uint8_t options;
@@ -664,7 +664,7 @@ extern struct ospf_master *om;
extern unsigned short ospf_instance;
extern const int ospf_redistributed_proto_max;
extern struct zclient *zclient;
-extern struct event_master *master;
+extern struct event_loop *master;
extern int ospf_zlog;
extern struct zebra_privs_t ospfd_privs;
@@ -758,7 +758,7 @@ extern void ospf_interface_area_unset(struct ospf *ospf, struct interface *ifp);
extern void ospf_route_map_init(void);
-extern void ospf_master_init(struct event_master *master);
+extern void ospf_master_init(struct event_loop *master);
extern void ospf_vrf_init(void);
extern void ospf_vrf_terminate(void);
extern void ospf_vrf_link(struct ospf *ospf, struct vrf *vrf);
diff --git a/pathd/path_main.c b/pathd/path_main.c
index 92fd0bfd3..a837187da 100644
--- a/pathd/path_main.c
+++ b/pathd/path_main.c
@@ -41,7 +41,7 @@ struct zebra_privs_t pathd_privs = {
struct option longopts[] = {{0}};
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
static struct frr_daemon_info pathd_di;
diff --git a/pathd/path_pcep.c b/pathd/path_pcep.c
index 243879f63..ec9d8adfc 100644
--- a/pathd/path_pcep.c
+++ b/pathd/path_pcep.c
@@ -58,7 +58,7 @@ static void notify_status(struct path *path, bool not_changed);
/* Module Functions */
static int pcep_module_finish(void);
-static int pcep_module_late_init(struct event_master *tm);
+static int pcep_module_late_init(struct event_loop *tm);
static int pcep_module_init(void);
/* ------------ Path Helper Functions ------------ */
@@ -310,7 +310,7 @@ int pathd_candidate_removed_handler(struct srte_candidate *candidate)
* run before config load, so the CLI commands don't try to touch things that
* aren't set up yet...
*/
-static int pcep_module_config_pre(struct event_master *tm)
+static int pcep_module_config_pre(struct event_loop *tm)
{
assert(pcep_g->fpt == NULL);
assert(pcep_g->master == NULL);
@@ -329,7 +329,7 @@ static int pcep_module_config_pre(struct event_master *tm)
return 0;
}
-static int pcep_module_late_init(struct event_master *tm)
+static int pcep_module_late_init(struct event_loop *tm)
{
hook_register(pathd_candidate_created, pathd_candidate_created_handler);
hook_register(pathd_candidate_updated, pathd_candidate_updated_handler);
diff --git a/pathd/path_pcep.h b/pathd/path_pcep.h
index ef2edbacf..5c6a02372 100644
--- a/pathd/path_pcep.h
+++ b/pathd/path_pcep.h
@@ -294,7 +294,7 @@ struct path {
struct pcep_glob {
struct debug dbg;
- struct event_master *master;
+ struct event_loop *master;
struct frr_pthread *fpt;
uint8_t num_pce_opts_cli;
struct pce_opts_cli *pce_opts_cli[MAX_PCE];
diff --git a/pathd/path_pcep_controller.c b/pathd/path_pcep_controller.c
index a8897fc33..a00a11408 100644
--- a/pathd/path_pcep_controller.c
+++ b/pathd/path_pcep_controller.c
@@ -152,7 +152,7 @@ static const char *timeout_type_name(enum pcep_ctrl_timeout_type type);
/* ------------ API Functions Called from Main Thread ------------ */
-int pcep_ctrl_initialize(struct event_master *main_thread,
+int pcep_ctrl_initialize(struct event_loop *main_thread,
struct frr_pthread **fpt,
pcep_main_event_handler_t event_handler)
{
diff --git a/pathd/path_pcep_controller.h b/pathd/path_pcep_controller.h
index d1cf0a2a1..236b26771 100644
--- a/pathd/path_pcep_controller.h
+++ b/pathd/path_pcep_controller.h
@@ -33,8 +33,8 @@ enum pcep_pathd_event_type {
};
struct ctrl_state {
- struct event_master *main;
- struct event_master *self;
+ struct event_loop *main;
+ struct event_loop *self;
pcep_main_event_handler_t main_event_handler;
struct pcc_opts *pcc_opts;
int pcc_count;
@@ -97,7 +97,7 @@ struct pcep_pcc_info {
};
/* Functions called from the main thread */
-int pcep_ctrl_initialize(struct event_master *main_thread,
+int pcep_ctrl_initialize(struct event_loop *main_thread,
struct frr_pthread **fpt,
pcep_main_event_handler_t event_handler);
int pcep_ctrl_finalize(struct frr_pthread **fpt);
diff --git a/pathd/path_ted.c b/pathd/path_ted.c
index f471a8949..d8ddd8cdc 100644
--- a/pathd/path_ted.c
+++ b/pathd/path_ted.c
@@ -41,7 +41,7 @@ struct ted_state ted_state_g = {};
* path_path_ted public API function implementations
*/
-void path_ted_init(struct event_master *master)
+void path_ted_init(struct event_loop *master)
{
ted_state_g.main = master;
ted_state_g.link_state_delay_interval = TIMER_RETRY_DELAY;
diff --git a/pathd/path_ted.h b/pathd/path_ted.h
index 735976f7f..a1bc784b7 100644
--- a/pathd/path_ted.h
+++ b/pathd/path_ted.h
@@ -41,7 +41,7 @@ enum igp_import {
IMPORT_OSPFv3
};
struct ted_state {
- struct event_master *main;
+ struct event_loop *main;
/* Status of TED: enable or disable */
bool enabled;
/* From which igp is going to receive data */
@@ -84,7 +84,7 @@ struct ted_state {
/* TED management functions */
bool path_ted_is_initialized(void);
-void path_ted_init(struct event_master *master);
+void path_ted_init(struct event_loop *master);
uint32_t path_ted_teardown(void);
void path_ted_timer_sync_cancel(void);
void path_ted_timer_refresh_cancel(void);
diff --git a/pathd/path_zebra.c b/pathd/path_zebra.c
index dcaf0eba1..8d9206bfa 100644
--- a/pathd/path_zebra.c
+++ b/pathd/path_zebra.c
@@ -318,7 +318,7 @@ static zclient_handler *const path_handlers[] = {
*
* @param master The master thread
*/
-void path_zebra_init(struct event_master *master)
+void path_zebra_init(struct event_loop *master)
{
struct zclient_options options = zclient_options_default;
options.synchronous = true;
diff --git a/pathd/path_zebra.h b/pathd/path_zebra.h
index 44369526d..74a62e38b 100644
--- a/pathd/path_zebra.h
+++ b/pathd/path_zebra.h
@@ -16,7 +16,7 @@ void path_zebra_add_sr_policy(struct srte_policy *policy,
void path_zebra_delete_sr_policy(struct srte_policy *policy);
int path_zebra_request_label(mpls_label_t label);
void path_zebra_release_label(mpls_label_t label);
-void path_zebra_init(struct event_master *master);
+void path_zebra_init(struct event_loop *master);
void path_zebra_stop(void);
#endif /* _FRR_PATH_MPLS_H_ */
diff --git a/pathd/pathd.h b/pathd/pathd.h
index 92d07ef26..73ad49226 100644
--- a/pathd/pathd.h
+++ b/pathd/pathd.h
@@ -371,7 +371,7 @@ extern struct srte_policy_head srte_policies;
extern struct zebra_privs_t pathd_privs;
/* master thread, defined in path_main.c */
-extern struct event_master *master;
+extern struct event_loop *master;
/* pathd.c */
struct srte_segment_list *srte_segment_list_add(const char *name);
diff --git a/pbrd/pbr_main.c b/pbrd/pbr_main.c
index 360f5d6e0..c2a9298f3 100644
--- a/pbrd/pbr_main.c
+++ b/pbrd/pbr_main.c
@@ -56,7 +56,7 @@ struct zebra_privs_t pbr_privs = {
struct option longopts[] = { { 0 } };
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
/* SIGHUP handler. */
static void sighup(void)
diff --git a/pbrd/pbr_zebra.h b/pbrd/pbr_zebra.h
index 4d1768421..ef844ef79 100644
--- a/pbrd/pbr_zebra.h
+++ b/pbrd/pbr_zebra.h
@@ -11,7 +11,7 @@ struct pbr_interface {
char mapname[100];
};
-extern struct event_master *master;
+extern struct event_loop *master;
extern void pbr_zebra_init(void);
diff --git a/pimd/pim_instance.h b/pimd/pim_instance.h
index 2afd4781d..11577ae46 100644
--- a/pimd/pim_instance.h
+++ b/pimd/pim_instance.h
@@ -64,7 +64,7 @@ enum pim_mlag_flags {
};
struct pim_router {
- struct event_master *master;
+ struct event_loop *master;
uint32_t debugs;
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c
index 18146db52..6c169a7e7 100644
--- a/pimd/pim_msdp.c
+++ b/pimd/pim_msdp.c
@@ -1333,7 +1333,7 @@ static void pim_msdp_enable(struct pim_instance *pim)
}
/* MSDP init */
-void pim_msdp_init(struct pim_instance *pim, struct event_master *master)
+void pim_msdp_init(struct pim_instance *pim, struct event_loop *master)
{
pim->msdp.master = master;
char hash_name[64];
diff --git a/pimd/pim_msdp.h b/pimd/pim_msdp.h
index c2ee272ef..ddc015f9b 100644
--- a/pimd/pim_msdp.h
+++ b/pimd/pim_msdp.h
@@ -172,7 +172,7 @@ struct pim_msdp_listener {
struct pim_msdp {
enum pim_msdp_flags flags;
- struct event_master *master;
+ struct event_loop *master;
struct pim_msdp_listener listener;
uint32_t rejected_accepts;
@@ -217,7 +217,7 @@ struct pim_msdp {
#if PIM_IPV != 6
// struct pim_msdp *msdp;
struct pim_instance;
-void pim_msdp_init(struct pim_instance *pim, struct event_master *master);
+void pim_msdp_init(struct pim_instance *pim, struct event_loop *master);
void pim_msdp_exit(struct pim_instance *pim);
char *pim_msdp_state_dump(enum pim_msdp_peer_state state, char *buf,
int buf_size);
@@ -308,7 +308,7 @@ void pim_msdp_peer_change_source(struct pim_msdp_peer *mp,
#else /* PIM_IPV == 6 */
static inline void pim_msdp_init(struct pim_instance *pim,
- struct event_master *master)
+ struct event_loop *master)
{
}
diff --git a/ripd/rip_main.c b/ripd/rip_main.c
index f5743d814..fbe877ca7 100644
--- a/ripd/rip_main.c
+++ b/ripd/rip_main.c
@@ -47,7 +47,7 @@ struct zebra_privs_t ripd_privs = {
.cap_num_i = 0};
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
static struct frr_daemon_info ripd_di;
diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c
index d6db7f982..0e5d4d54c 100644
--- a/ripd/rip_snmp.c
+++ b/ripd/rip_snmp.c
@@ -135,7 +135,7 @@ static struct variable rip_variables[] = {
{RIP2PEERRCVBADPACKETS, COUNTER, RONLY, rip2PeerTable, 3, {4, 1, 5}},
{RIP2PEERRCVBADROUTES, COUNTER, RONLY, rip2PeerTable, 3, {4, 1, 6}}};
-extern struct event_master *master;
+extern struct event_loop *master;
static uint8_t *rip2Globals(struct variable *v, oid name[], size_t *length,
int exact, size_t *var_len,
@@ -553,7 +553,7 @@ static uint8_t *rip2PeerTable(struct variable *v, oid name[], size_t *length,
}
/* Register RIPv2-MIB. */
-static int rip_snmp_init(struct event_master *master)
+static int rip_snmp_init(struct event_loop *master)
{
rip_ifaddr_table = route_table_init();
diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c
index 3904c9e4b..35c4b1f1b 100644
--- a/ripd/rip_zebra.c
+++ b/ripd/rip_zebra.c
@@ -223,7 +223,7 @@ zclient_handler *const rip_handlers[] = {
[ZEBRA_REDISTRIBUTE_ROUTE_DEL] = rip_zebra_read_route,
};
-void rip_zclient_init(struct event_master *master)
+void rip_zclient_init(struct event_loop *master)
{
/* Set default value to the zebra client structure. */
zclient = zclient_new(master, &zclient_options_default, rip_handlers,
diff --git a/ripd/ripd.h b/ripd/ripd.h
index 1b41ffab1..6cde37148 100644
--- a/ripd/ripd.h
+++ b/ripd/ripd.h
@@ -418,7 +418,7 @@ extern void rip_if_init(void);
extern void rip_route_map_init(void);
extern void rip_zebra_vrf_register(struct vrf *vrf);
extern void rip_zebra_vrf_deregister(struct vrf *vrf);
-extern void rip_zclient_init(struct event_master *);
+extern void rip_zclient_init(struct event_loop *);
extern void rip_zclient_stop(void);
extern int if_check_address(struct rip *rip, struct in_addr addr);
extern struct rip *rip_lookup_by_vrf_id(vrf_id_t vrf_id);
@@ -509,7 +509,7 @@ extern struct zebra_privs_t ripd_privs;
extern struct rip_instance_head rip_instances;
/* Master thread structure. */
-extern struct event_master *master;
+extern struct event_loop *master;
DECLARE_HOOK(rip_ifaddr_add, (struct connected * ifc), (ifc));
DECLARE_HOOK(rip_ifaddr_del, (struct connected * ifc), (ifc));
diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c
index 18a18b214..bedd39375 100644
--- a/ripngd/ripng_main.c
+++ b/ripngd/ripng_main.c
@@ -48,7 +48,7 @@ struct zebra_privs_t ripngd_privs = {
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
static struct frr_daemon_info ripngd_di;
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index 9bb3826d7..d974d65df 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -228,7 +228,7 @@ static zclient_handler *const ripng_handlers[] = {
};
/* Initialize zebra structure and it's commands. */
-void zebra_init(struct event_master *master)
+void zebra_init(struct event_loop *master)
{
/* Allocate zebra structure. */
zclient = zclient_new(master, &zclient_options_default, ripng_handlers,
diff --git a/ripngd/ripngd.h b/ripngd/ripngd.h
index a94711013..eefcb0ee6 100644
--- a/ripngd/ripngd.h
+++ b/ripngd/ripngd.h
@@ -316,7 +316,7 @@ struct ripng_offset_list {
/* Extern variables. */
extern struct zebra_privs_t ripngd_privs;
-extern struct event_master *master;
+extern struct event_loop *master;
extern struct ripng_instance_head ripng_instances;
/* Prototypes. */
@@ -338,7 +338,7 @@ extern void ripng_zebra_vrf_register(struct vrf *vrf);
extern void ripng_zebra_vrf_deregister(struct vrf *vrf);
extern void ripng_terminate(void);
/* zclient_init() is done by ripng_zebra.c:zebra_init() */
-extern void zebra_init(struct event_master *master);
+extern void zebra_init(struct event_loop *master);
extern void ripng_zebra_stop(void);
extern void ripng_redistribute_conf_update(struct ripng *ripng, int type);
extern void ripng_redistribute_conf_delete(struct ripng *ripng, int type);
diff --git a/sharpd/sharp_logpump.c b/sharpd/sharp_logpump.c
index 4a3fffb28..8a8650717 100644
--- a/sharpd/sharp_logpump.c
+++ b/sharpd/sharp_logpump.c
@@ -28,7 +28,7 @@ static size_t lp_ctr, lp_expect;
static struct rusage lp_rusage;
static struct vty *lp_vty;
-extern struct event_master *master;
+extern struct event_loop *master;
static void logpump_done(struct event *thread)
{
diff --git a/sharpd/sharp_main.c b/sharpd/sharp_main.c
index 3e3db11bb..80979ec9a 100644
--- a/sharpd/sharp_main.c
+++ b/sharpd/sharp_main.c
@@ -55,7 +55,7 @@ struct zebra_privs_t sharp_privs = {
struct option longopts[] = {{0}};
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
/* SIGHUP handler. */
static void sighup(void)
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c
index 8c468e0ae..189d61db2 100644
--- a/sharpd/sharp_zebra.c
+++ b/sharpd/sharp_zebra.c
@@ -26,7 +26,7 @@
struct zclient *zclient = NULL;
/* For registering threads. */
-extern struct event_master *master;
+extern struct event_loop *master;
/* Privs info */
extern struct zebra_privs_t sharp_privs;
diff --git a/staticd/static_bfd.c b/staticd/static_bfd.c
index eceb35711..78d8c0580 100644
--- a/staticd/static_bfd.c
+++ b/staticd/static_bfd.c
@@ -201,7 +201,7 @@ void static_next_hop_bfd_profile(struct static_nexthop *sn, const char *name)
bfd_sess_install(sn->bsp);
}
-void static_bfd_initialize(struct zclient *zc, struct event_master *tm)
+void static_bfd_initialize(struct zclient *zc, struct event_loop *tm)
{
/* Initialize BFD integration library. */
bfd_protocol_integration_init(zc, tm);
diff --git a/staticd/static_main.c b/staticd/static_main.c
index 646340bac..d6ef91fea 100644
--- a/staticd/static_main.c
+++ b/staticd/static_main.c
@@ -51,7 +51,7 @@ struct zebra_privs_t static_privs = {
struct option longopts[] = { { 0 } };
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
uintptr_t mgmt_lib_hndl;
diff --git a/staticd/static_routes.h b/staticd/static_routes.h
index b5c8353e1..3be6fd6b1 100644
--- a/staticd/static_routes.h
+++ b/staticd/static_routes.h
@@ -252,7 +252,7 @@ extern void static_next_hop_bfd_profile(struct static_nexthop *sn,
extern void static_next_hop_bfd_multi_hop(struct static_nexthop *sn, bool mhop);
/** Call this function after zebra client initialization. */
-extern void static_bfd_initialize(struct zclient *zc, struct event_master *tm);
+extern void static_bfd_initialize(struct zclient *zc, struct event_loop *tm);
extern void static_bfd_show(struct vty *vty, bool isjson);
diff --git a/staticd/static_zebra.h b/staticd/static_zebra.h
index 0e7048f81..c4f4ebdcb 100644
--- a/staticd/static_zebra.h
+++ b/staticd/static_zebra.h
@@ -11,7 +11,7 @@
extern "C" {
#endif
-extern struct event_master *master;
+extern struct event_loop *master;
extern void static_zebra_nht_register(struct static_nexthop *nh, bool reg);
diff --git a/tests/bgpd/test_aspath.c b/tests/bgpd/test_aspath.c
index 5460be101..57aa2af9d 100644
--- a/tests/bgpd/test_aspath.c
+++ b/tests/bgpd/test_aspath.c
@@ -26,7 +26,7 @@
/* need these to link in libbgp */
struct zebra_privs_t bgpd_privs = {};
-struct event_master *master = NULL;
+struct event_loop *master = NULL;
static int failed = 0;
diff --git a/tests/bgpd/test_capability.c b/tests/bgpd/test_capability.c
index 9ba43e14f..da17471fd 100644
--- a/tests/bgpd/test_capability.c
+++ b/tests/bgpd/test_capability.c
@@ -30,7 +30,7 @@
/* need these to link in libbgp */
struct zebra_privs_t bgpd_privs = {};
-struct event_master *master = NULL;
+struct event_loop *master = NULL;
static int failed = 0;
static int tty = 0;
diff --git a/tests/bgpd/test_ecommunity.c b/tests/bgpd/test_ecommunity.c
index d2e3d2272..49322d3e2 100644
--- a/tests/bgpd/test_ecommunity.c
+++ b/tests/bgpd/test_ecommunity.c
@@ -16,7 +16,7 @@
/* need these to link in libbgp */
struct zebra_privs_t bgpd_privs = {};
-struct event_master *master = NULL;
+struct event_loop *master = NULL;
static int failed = 0;
diff --git a/tests/bgpd/test_mp_attr.c b/tests/bgpd/test_mp_attr.c
index 96daa182d..54596dbdf 100644
--- a/tests/bgpd/test_mp_attr.c
+++ b/tests/bgpd/test_mp_attr.c
@@ -35,7 +35,7 @@
/* need these to link in libbgp */
struct zebra_privs_t bgpd_privs = {};
-struct event_master *master = NULL;
+struct event_loop *master = NULL;
static int failed = 0;
static int tty = 0;
diff --git a/tests/bgpd/test_mpath.c b/tests/bgpd/test_mpath.c
index 348ce9e45..0124ad9b2 100644
--- a/tests/bgpd/test_mpath.c
+++ b/tests/bgpd/test_mpath.c
@@ -61,7 +61,7 @@ struct testcase_t__ {
};
/* need these to link in libbgp */
-struct event_master *master = NULL;
+struct event_loop *master = NULL;
extern struct zclient *zclient;
struct zebra_privs_t bgpd_privs = {
.user = NULL,
diff --git a/tests/bgpd/test_packet.c b/tests/bgpd/test_packet.c
index 3492a95fa..94c3feaa9 100644
--- a/tests/bgpd/test_packet.c
+++ b/tests/bgpd/test_packet.c
@@ -25,7 +25,7 @@
/* need these to link in libbgp */
struct zebra_privs_t bgpd_privs = {};
-struct event_master *master = NULL;
+struct event_loop *master = NULL;
static struct bgp *bgp;
static as_t asn = 100;
diff --git a/tests/bgpd/test_peer_attr.c b/tests/bgpd/test_peer_attr.c
index 349a51634..bc6eba906 100644
--- a/tests/bgpd/test_peer_attr.c
+++ b/tests/bgpd/test_peer_attr.c
@@ -106,7 +106,7 @@
/* Required variables to link in libbgp */
struct zebra_privs_t bgpd_privs = {0};
-struct event_master *master;
+struct event_loop *master;
enum test_state {
TEST_SUCCESS,
diff --git a/tests/helpers/c/main.c b/tests/helpers/c/main.c
index d5be75046..5eb841448 100644
--- a/tests/helpers/c/main.c
+++ b/tests/helpers/c/main.c
@@ -14,7 +14,7 @@
extern void test_init(void);
-struct event_master *master;
+struct event_loop *master;
struct option longopts[] = {{"daemon", no_argument, NULL, 'd'},
{"config_file", required_argument, NULL, 'f'},
diff --git a/tests/isisd/test_common.c b/tests/isisd/test_common.c
index 7c0557ea7..d0288f600 100644
--- a/tests/isisd/test_common.c
+++ b/tests/isisd/test_common.c
@@ -12,7 +12,7 @@
#include "test_common.h"
-struct event_master *master;
+struct event_loop *master;
struct zebra_privs_t isisd_privs;
int isis_sock_init(struct isis_circuit *circuit)
diff --git a/tests/isisd/test_common.h b/tests/isisd/test_common.h
index 28520fb91..f0c5493c9 100644
--- a/tests/isisd/test_common.h
+++ b/tests/isisd/test_common.h
@@ -65,7 +65,7 @@ extern int test_topology_load(const struct isis_topology *topology,
struct lspdb_head lspdb[]);
/* Global variables. */
-extern struct event_master *master;
+extern struct event_loop *master;
extern struct zebra_privs_t isisd_privs;
extern struct isis_topology test_topologies[];
diff --git a/tests/lib/cli/common_cli.c b/tests/lib/cli/common_cli.c
index bc3a4b534..a02b2e460 100644
--- a/tests/lib/cli/common_cli.c
+++ b/tests/lib/cli/common_cli.c
@@ -17,7 +17,7 @@
#include "common_cli.h"
-struct event_master *master;
+struct event_loop *master;
int dump_args(struct vty *vty, const char *descr, int argc,
struct cmd_token *argv[])
diff --git a/tests/lib/cli/common_cli.h b/tests/lib/cli/common_cli.h
index 697074355..4a1de940d 100644
--- a/tests/lib/cli/common_cli.h
+++ b/tests/lib/cli/common_cli.h
@@ -22,7 +22,7 @@ extern void test_init(int argc, char **argv);
/* functions provided by common cli
* (includes main())
*/
-extern struct event_master *master;
+extern struct event_loop *master;
extern int test_log_prio;
diff --git a/tests/lib/cli/test_commands.c b/tests/lib/cli/test_commands.c
index 9f788ae18..ea84120fc 100644
--- a/tests/lib/cli/test_commands.c
+++ b/tests/lib/cli/test_commands.c
@@ -30,7 +30,7 @@ extern vector cmdvec;
extern struct cmd_node vty_node;
extern void test_init_cmd(void); /* provided in test-commands-defun.c */
-struct event_master *master; /* dummy for libfrr*/
+struct event_loop *master; /* dummy for libfrr*/
static vector test_cmds;
static char test_buf[32768];
diff --git a/tests/lib/northbound/test_oper_data.c b/tests/lib/northbound/test_oper_data.c
index e7d5328bb..d88b37fb4 100644
--- a/tests/lib/northbound/test_oper_data.c
+++ b/tests/lib/northbound/test_oper_data.c
@@ -14,7 +14,7 @@
#include "log.h"
#include "northbound.h"
-static struct event_master *master;
+static struct event_loop *master;
struct troute {
struct prefix_ipv4 prefix;
diff --git a/tests/lib/test_assert.c b/tests/lib/test_assert.c
index cefdc113a..353574359 100644
--- a/tests/lib/test_assert.c
+++ b/tests/lib/test_assert.c
@@ -28,7 +28,7 @@ static void func_for_bt(int number)
int main(int argc, char **argv)
{
int number = 10;
- struct event_master *master;
+ struct event_loop *master;
zlog_aux_init("NONE: ", LOG_DEBUG);
diff --git a/tests/lib/test_buffer.c b/tests/lib/test_buffer.c
index 4d6fb0d15..bfb460084 100644
--- a/tests/lib/test_buffer.c
+++ b/tests/lib/test_buffer.c
@@ -8,7 +8,7 @@
#include <lib_vty.h>
#include <buffer.h>
-struct event_master *master;
+struct event_loop *master;
int main(int argc, char **argv)
{
diff --git a/tests/lib/test_checksum.c b/tests/lib/test_checksum.c
index ff787f93a..329ae6087 100644
--- a/tests/lib/test_checksum.c
+++ b/tests/lib/test_checksum.c
@@ -11,7 +11,7 @@
#include "network.h"
#include "prng.h"
-struct event_master *master;
+struct event_loop *master;
struct acc_vals {
int c0;
diff --git a/tests/lib/test_grpc.cpp b/tests/lib/test_grpc.cpp
index dd067e9f1..65633c471 100644
--- a/tests/lib/test_grpc.cpp
+++ b/tests/lib/test_grpc.cpp
@@ -34,13 +34,13 @@
#include <grpcpp/security/credentials.h>
#include "grpc/frr-northbound.grpc.pb.h"
-DEFINE_HOOK(frr_late_init, (struct event_master * tm), (tm));
+DEFINE_HOOK(frr_late_init, (struct event_loop * tm), (tm));
DEFINE_KOOH(frr_fini, (), ());
struct vty *vty;
bool mpls_enabled;
-struct event_master *master;
+struct event_loop *master;
struct zebra_privs_t static_privs = {0};
struct frrmod_runtime *grpc_module;
char binpath[2 * MAXPATHLEN + 1];
diff --git a/tests/lib/test_heavy_thread.c b/tests/lib/test_heavy_thread.c
index f931894ff..48e95a8dd 100644
--- a/tests/lib/test_heavy_thread.c
+++ b/tests/lib/test_heavy_thread.c
@@ -22,7 +22,7 @@
#include "tests.h"
-extern struct event_master *master;
+extern struct event_loop *master;
enum { ITERS_FIRST = 0,
ITERS_ERR = 100,
diff --git a/tests/lib/test_heavy_wq.c b/tests/lib/test_heavy_wq.c
index 93aafe83f..f43bd77a6 100644
--- a/tests/lib/test_heavy_wq.c
+++ b/tests/lib/test_heavy_wq.c
@@ -27,7 +27,7 @@ DEFINE_MGROUP(TEST_HEAVYWQ, "heavy-wq test");
DEFINE_MTYPE_STATIC(TEST_HEAVYWQ, WQ_NODE, "heavy_wq_node");
DEFINE_MTYPE_STATIC(TEST_HEAVYWQ, WQ_NODE_STR, "heavy_wq_node->str");
-extern struct event_master *master;
+extern struct event_loop *master;
static struct work_queue *heavy_wq;
struct heavy_wq_node {
diff --git a/tests/lib/test_memory.c b/tests/lib/test_memory.c
index a77ee3d22..aba4c3589 100644
--- a/tests/lib/test_memory.c
+++ b/tests/lib/test_memory.c
@@ -15,7 +15,7 @@ DEFINE_MTYPE_STATIC(TEST_MEMORY, TEST, "generic test mtype");
* CVS
*/
-struct event_master *master;
+struct event_loop *master;
#if 0 /* set to 1 to use system alloc directly */
#undef XMALLOC
diff --git a/tests/lib/test_nexthop_iter.c b/tests/lib/test_nexthop_iter.c
index 1cff00d4b..91380f111 100644
--- a/tests/lib/test_nexthop_iter.c
+++ b/tests/lib/test_nexthop_iter.c
@@ -13,7 +13,7 @@
#include "zebra/rib.h"
#include "prng.h"
-struct event_master *master;
+struct event_loop *master;
static int verbose;
static void str_append(char **buf, const char *repr)
diff --git a/tests/lib/test_privs.c b/tests/lib/test_privs.c
index 13b1c194e..e26754857 100644
--- a/tests/lib/test_privs.c
+++ b/tests/lib/test_privs.c
@@ -50,7 +50,7 @@ Report bugs to %s\n",
exit(status);
}
-struct event_master *master;
+struct event_loop *master;
/* main routine. */
int main(int argc, char **argv)
{
diff --git a/tests/lib/test_resolver.c b/tests/lib/test_resolver.c
index 5eb99b2ad..d72ff4f5a 100644
--- a/tests/lib/test_resolver.c
+++ b/tests/lib/test_resolver.c
@@ -26,7 +26,7 @@
#include "tests/lib/cli/common_cli.h"
-extern struct event_master *master;
+extern struct event_loop *master;
static void resolver_result(struct resolver_query *resq, const char *errstr,
int numaddrs, union sockunion *addr)
diff --git a/tests/lib/test_segv.c b/tests/lib/test_segv.c
index b417ac536..af5f3aec6 100644
--- a/tests/lib/test_segv.c
+++ b/tests/lib/test_segv.c
@@ -17,7 +17,7 @@
struct frr_signal_t sigs[] = {};
-struct event_master *master;
+struct event_loop *master;
void func1(int *arg);
void func3(void);
diff --git a/tests/lib/test_sig.c b/tests/lib/test_sig.c
index e3005f744..2bd7f3097 100644
--- a/tests/lib/test_sig.c
+++ b/tests/lib/test_sig.c
@@ -35,7 +35,7 @@ struct frr_signal_t sigs[] = {{
.handler = &sigusr2,
}};
-struct event_master *master;
+struct event_loop *master;
struct event t;
int main(void)
diff --git a/tests/lib/test_srcdest_table.c b/tests/lib/test_srcdest_table.c
index a93a968db..6d6c5156a 100644
--- a/tests/lib/test_srcdest_table.c
+++ b/tests/lib/test_srcdest_table.c
@@ -24,7 +24,7 @@
#define s6_addr32 __u6_addr.__u6_addr32
#endif /*s6_addr32*/
-struct event_master *master;
+struct event_loop *master;
/* This structure is copied from lib/srcdest_table.c to which it is
* private as far as other parts of Quagga are concerned.
diff --git a/tests/lib/test_stream.c b/tests/lib/test_stream.c
index 319afd9cf..489f56c13 100644
--- a/tests/lib/test_stream.c
+++ b/tests/lib/test_stream.c
@@ -11,7 +11,7 @@
#include "printfrr.h"
static unsigned long long ham = 0xdeadbeefdeadbeef;
-struct event_master *master;
+struct event_loop *master;
static void print_stream(struct stream *s)
{
diff --git a/tests/lib/test_table.c b/tests/lib/test_table.c
index 2ae1fe82a..51bfda234 100644
--- a/tests/lib/test_table.c
+++ b/tests/lib/test_table.c
@@ -25,7 +25,7 @@ typedef struct test_node_t_ {
char *prefix_str;
} test_node_t;
-struct event_master *master;
+struct event_loop *master;
/*
* add_node
diff --git a/tests/lib/test_timer_correctness.c b/tests/lib/test_timer_correctness.c
index c8ae5fa19..deaff9d48 100644
--- a/tests/lib/test_timer_correctness.c
+++ b/tests/lib/test_timer_correctness.c
@@ -23,7 +23,7 @@
#define TIMESTR_LEN strlen("4294967296.999999")
-struct event_master *master;
+struct event_loop *master;
static size_t log_buf_len;
static size_t log_buf_pos;
diff --git a/tests/lib/test_timer_performance.c b/tests/lib/test_timer_performance.c
index f197a8d03..2dcbb8c59 100644
--- a/tests/lib/test_timer_performance.c
+++ b/tests/lib/test_timer_performance.c
@@ -20,7 +20,7 @@
#define SCHEDULE_TIMERS 1000000
#define REMOVE_TIMERS 500000
-struct event_master *master;
+struct event_loop *master;
static void dummy_func(struct event *thread)
{
diff --git a/tests/lib/test_zmq.c b/tests/lib/test_zmq.c
index dd9d10b97..2cd9d47cb 100644
--- a/tests/lib/test_zmq.c
+++ b/tests/lib/test_zmq.c
@@ -12,7 +12,7 @@
DEFINE_MTYPE_STATIC(LIB, TESTBUF, "zmq test buffer");
DEFINE_MTYPE_STATIC(LIB, ZMQMSG, "zmq message");
-static struct event_master *master;
+static struct event_loop *master;
static void msg_buf_free(void *data, void *hint)
{
diff --git a/tests/ospfd/common.c b/tests/ospfd/common.c
index 38bc08984..e3941865a 100644
--- a/tests/ospfd/common.c
+++ b/tests/ospfd/common.c
@@ -17,7 +17,7 @@
#include "common.h"
-struct event_master *master;
+struct event_loop *master;
struct zebra_privs_t ospfd_privs;
diff --git a/tests/ospfd/common.h b/tests/ospfd/common.h
index 2b02b0f0e..18e412bd3 100644
--- a/tests/ospfd/common.h
+++ b/tests/ospfd/common.h
@@ -30,7 +30,7 @@ extern int topology_load(struct vty *vty, struct ospf_topology *topology,
struct ospf_test_node *root, struct ospf *ospf);
/* Global variables. */
-extern struct event_master *master;
+extern struct event_loop *master;
extern struct ospf_topology topo1;
extern struct ospf_topology topo2;
extern struct ospf_topology topo3;
diff --git a/vrrpd/vrrp.h b/vrrpd/vrrp.h
index c36c7fa23..fdbd35f06 100644
--- a/vrrpd/vrrp.h
+++ b/vrrpd/vrrp.h
@@ -65,7 +65,7 @@ struct vrrp_defaults {
extern struct vrrp_defaults vd;
/* threadmaster */
-extern struct event_master *master;
+extern struct event_loop *master;
/* privileges */
extern struct zebra_privs_t vrrp_privs;
diff --git a/vrrpd/vrrp_main.c b/vrrpd/vrrp_main.c
index 1ded5238c..5d4bffe03 100644
--- a/vrrpd/vrrp_main.c
+++ b/vrrpd/vrrp_main.c
@@ -50,7 +50,7 @@ struct zebra_privs_t vrrp_privs = {
struct option longopts[] = { {0} };
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
static struct frr_daemon_info vrrpd_di;
diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h
index 3299df67e..cb6357f5e 100644
--- a/vtysh/vtysh.h
+++ b/vtysh/vtysh.h
@@ -9,9 +9,9 @@
#include "memory.h"
DECLARE_MGROUP(MVTYSH);
-struct event_master;
+struct event_loop;
-extern struct event_master *master;
+extern struct event_loop *master;
#define VTYSH_ZEBRA 0x00001
#define VTYSH_RIPD 0x00002
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index 7b92ac220..c22889a4f 100644
--- a/vtysh/vtysh_main.c
+++ b/vtysh/vtysh_main.c
@@ -64,7 +64,7 @@ int execute_flag = 0;
int user_mode;
/* Master of threads. */
-struct event_master *master;
+struct event_loop *master;
/* Command logging */
FILE *logfile;
diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c
index 1797fc0f0..c6eac46ae 100644
--- a/watchfrr/watchfrr.c
+++ b/watchfrr/watchfrr.c
@@ -53,7 +53,7 @@ DEFINE_MGROUP(WATCHFRR, "watchfrr");
DEFINE_MTYPE_STATIC(WATCHFRR, WATCHFRR_DAEMON, "watchfrr daemon entry");
/* Needs to be global, referenced somewhere inside libfrr. */
-struct event_master *master;
+struct event_loop *master;
static bool watch_only = false;
const char *pathspace;
diff --git a/zebra/dpdk/zebra_dplane_dpdk.c b/zebra/dpdk/zebra_dplane_dpdk.c
index eed5e75b7..b13daa3a9 100644
--- a/zebra/dpdk/zebra_dplane_dpdk.c
+++ b/zebra/dpdk/zebra_dplane_dpdk.c
@@ -694,7 +694,7 @@ static int zd_dpdk_finish(struct zebra_dplane_provider *prov, bool early)
}
-static int zd_dpdk_plugin_init(struct event_master *tm)
+static int zd_dpdk_plugin_init(struct event_loop *tm)
{
int ret;
diff --git a/zebra/dplane_fpm_nl.c b/zebra/dplane_fpm_nl.c
index 54bbc9933..b3bf1197b 100644
--- a/zebra/dplane_fpm_nl.c
+++ b/zebra/dplane_fpm_nl.c
@@ -1585,7 +1585,7 @@ static int fpm_nl_process(struct zebra_dplane_provider *prov)
return 0;
}
-static int fpm_nl_new(struct event_master *tm)
+static int fpm_nl_new(struct event_loop *tm)
{
struct zebra_dplane_provider *prov = NULL;
int rv;
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index 1e520283f..19b749b56 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -316,7 +316,7 @@ static int irdp_finish(void)
return 0;
}
-static int irdp_init(struct event_master *master)
+static int irdp_init(struct event_loop *master)
{
irdp_if_init();
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index 9cd06c1a0..04d30577c 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -156,7 +156,7 @@ static const struct message rttype_str[] = {{RTN_UNSPEC, "none"},
{RTN_XRESOLVE, "resolver"},
{0}};
-extern struct event_master *master;
+extern struct event_loop *master;
extern struct zebra_privs_t zserv_privs;
diff --git a/zebra/main.c b/zebra/main.c
index 827a0dd5e..391633c35 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -52,7 +52,7 @@
pid_t pid;
/* Pacify zclient.o in libfrr, which expects this variable. */
-struct event_master *master;
+struct event_loop *master;
/* Route retain mode flag. */
int retain_mode = 0;
diff --git a/zebra/sample_plugin.c b/zebra/sample_plugin.c
index 5892b949d..b5f7b8837 100644
--- a/zebra/sample_plugin.c
+++ b/zebra/sample_plugin.c
@@ -76,7 +76,7 @@ static int sample_process(struct zebra_dplane_provider *prov)
* Init entry point called during zebra startup. This is registered during
* module init.
*/
-static int init_sample_plugin(struct event_master *tm)
+static int init_sample_plugin(struct event_loop *tm)
{
int ret;
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 5682b08f0..fb1ebc682 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -582,7 +582,7 @@ static struct zebra_dplane_globals {
struct frr_pthread *dg_pthread;
/* Event-delivery context 'master' for the dplane */
- struct event_master *dg_master;
+ struct event_loop *dg_master;
/* Event/'thread' pointer for queued updates */
struct event *dg_t_update;
@@ -633,7 +633,7 @@ neigh_update_internal(enum dplane_op_e op, const struct interface *ifp,
*/
/* Obtain thread_master for dataplane thread */
-struct event_master *dplane_get_thread_master(void)
+struct event_loop *dplane_get_thread_master(void)
{
return zdplane_info.dg_master;
}
diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h
index 05d42a217..6716c0ffb 100644
--- a/zebra/zebra_dplane.h
+++ b/zebra/zebra_dplane.h
@@ -1006,7 +1006,7 @@ void dplane_provider_lock(struct zebra_dplane_provider *prov);
void dplane_provider_unlock(struct zebra_dplane_provider *prov);
/* Obtain thread_master for dataplane thread */
-struct event_master *dplane_get_thread_master(void);
+struct event_loop *dplane_get_thread_master(void);
/* Providers should (generally) limit number of updates per work cycle */
int dplane_provider_get_work_limit(const struct zebra_dplane_provider *prov);
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index 0842b4431..5b4e493e4 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -156,7 +156,7 @@ struct zfpm_glob {
*/
enum zfpm_msg_format message_format;
- struct event_master *master;
+ struct event_loop *master;
enum zfpm_state state;
@@ -1978,7 +1978,7 @@ static struct cmd_node zebra_node = {
*
* Returns true on success.
*/
-static int zfpm_init(struct event_master *master)
+static int zfpm_init(struct event_loop *master)
{
int enable = 1;
uint16_t port = 0;
diff --git a/zebra/zebra_mlag_private.c b/zebra/zebra_mlag_private.c
index 62870119f..d85097f2a 100644
--- a/zebra/zebra_mlag_private.c
+++ b/zebra/zebra_mlag_private.c
@@ -32,7 +32,7 @@
*
*/
-static struct event_master *zmlag_master;
+static struct event_loop *zmlag_master;
static int mlag_socket;
static void zebra_mlag_connect(struct event *thread);
diff --git a/zebra/zebra_opaque.c b/zebra/zebra_opaque.c
index b2a5415c4..8ceb1f8dc 100644
--- a/zebra/zebra_opaque.c
+++ b/zebra/zebra_opaque.c
@@ -77,7 +77,7 @@ static struct zebra_opaque_globals {
struct frr_pthread *pthread;
/* Event-delivery context 'master' for the module */
- struct event_master *master;
+ struct event_loop *master;
/* Event/'thread' pointer for queued zapi messages */
struct event *t_msgs;
diff --git a/zebra/zebra_router.h b/zebra/zebra_router.h
index 2179178a9..d81c7df58 100644
--- a/zebra/zebra_router.h
+++ b/zebra/zebra_router.h
@@ -110,7 +110,7 @@ struct zebra_mlag_info {
struct frr_pthread *zebra_pth_mlag;
/* MLAG Thread context 'master' */
- struct event_master *th_master;
+ struct event_loop *th_master;
/*
* Event for Initial MLAG Connection setup & Data Read
@@ -127,7 +127,7 @@ struct zebra_router {
atomic_bool in_shutdown;
/* Thread master */
- struct event_master *master;
+ struct event_loop *master;
/* Lists of clients who have connected to us */
struct list *client_list;
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c
index 07b7d77bd..e06733cb8 100644
--- a/zebra/zebra_snmp.c
+++ b/zebra/zebra_snmp.c
@@ -536,7 +536,7 @@ static uint8_t *ipCidrTable(struct variable *v, oid objid[], size_t *objid_len,
return NULL;
}
-static int zebra_snmp_init(struct event_master *tm)
+static int zebra_snmp_init(struct event_loop *tm)
{
smux_init(tm);
REGISTER_MIB("mibII/ipforward", zebra_variables, variable, ipfw_oid);