summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--babeld/babeld.c12
-rw-r--r--babeld/babeld.h4
-rw-r--r--bfdd/bfd.c8
-rw-r--r--bfdd/bfd.h32
-rw-r--r--bfdd/bfd_packet.c2
-rw-r--r--bfdd/control.c10
-rw-r--r--bfdd/dplane.c16
-rw-r--r--bgpd/bgp_bmp.c8
-rw-r--r--bgpd/bgp_bmp.h8
-rw-r--r--bgpd/bgp_conditional_adv.c2
-rw-r--r--bgpd/bgp_damp.c2
-rw-r--r--bgpd/bgp_damp.h2
-rw-r--r--bgpd/bgp_dump.c6
-rw-r--r--bgpd/bgp_evpn_mh.c4
-rw-r--r--bgpd/bgp_evpn_mh.h2
-rw-r--r--bgpd/bgp_fsm.c38
-rw-r--r--bgpd/bgp_fsm.h4
-rw-r--r--bgpd/bgp_io.c8
-rw-r--r--bgpd/bgp_labelpool.c4
-rw-r--r--bgpd/bgp_network.c2
-rw-r--r--bgpd/bgp_network.h2
-rw-r--r--bgpd/bgp_nht.c4
-rw-r--r--bgpd/bgp_packet.c8
-rw-r--r--bgpd/bgp_packet.h6
-rw-r--r--bgpd/bgp_route.c14
-rw-r--r--bgpd/bgp_route.h2
-rw-r--r--bgpd/bgp_routemap.c2
-rw-r--r--bgpd/bgp_rpki.c10
-rw-r--r--bgpd/bgp_table.h2
-rw-r--r--bgpd/bgp_updgrp.c4
-rw-r--r--bgpd/bgp_updgrp.h6
-rw-r--r--bgpd/bgp_updgrp_adv.c2
-rw-r--r--bgpd/bgp_vty.c4
-rw-r--r--bgpd/bgp_zebra.c4
-rw-r--r--bgpd/bgpd.c4
-rw-r--r--bgpd/bgpd.h65
-rw-r--r--bgpd/rfapi/rfapi_import.c14
-rw-r--r--bgpd/rfapi/rfapi_monitor.c4
-rw-r--r--bgpd/rfapi/rfapi_monitor.h4
-rw-r--r--bgpd/rfapi/rfapi_rib.c2
-rw-r--r--bgpd/rfapi/rfapi_rib.h2
-rw-r--r--bgpd/rfapi/rfapi_vty.c6
-rw-r--r--bgpd/rfapi/vnc_export_bgp.c2
-rw-r--r--bgpd/rfapi/vnc_export_table.h2
-rw-r--r--doc/developer/logging.rst8
-rw-r--r--doc/developer/process-architecture.rst12
-rw-r--r--doc/developer/rcu.rst2
-rw-r--r--eigrpd/eigrp_filter.c4
-rw-r--r--eigrpd/eigrp_filter.h4
-rw-r--r--eigrpd/eigrp_hello.c2
-rw-r--r--eigrpd/eigrp_neighbor.c2
-rw-r--r--eigrpd/eigrp_neighbor.h2
-rw-r--r--eigrpd/eigrp_network.h2
-rw-r--r--eigrpd/eigrp_packet.c8
-rw-r--r--eigrpd/eigrp_packet.h12
-rw-r--r--eigrpd/eigrp_structs.h16
-rw-r--r--eigrpd/eigrp_update.c2
-rw-r--r--isisd/fabricd.c12
-rw-r--r--isisd/isis_adjacency.c2
-rw-r--r--isisd/isis_adjacency.h6
-rw-r--r--isisd/isis_circuit.h16
-rw-r--r--isisd/isis_dr.c2
-rw-r--r--isisd/isis_dr.h2
-rw-r--r--isisd/isis_dynhn.c4
-rw-r--r--isisd/isis_events.c2
-rw-r--r--isisd/isis_events.h2
-rw-r--r--isisd/isis_ldp_sync.c2
-rw-r--r--isisd/isis_lfa.c2
-rw-r--r--isisd/isis_lsp.c16
-rw-r--r--isisd/isis_lsp.h4
-rw-r--r--isisd/isis_main.c2
-rw-r--r--isisd/isis_pdu.c15
-rw-r--r--isisd/isis_pdu.h10
-rw-r--r--isisd/isis_spf.c2
-rw-r--r--isisd/isis_sr.c2
-rw-r--r--isisd/isis_sr.h2
-rw-r--r--isisd/isis_tx_queue.c4
-rw-r--r--isisd/isisd.c2
-rw-r--r--isisd/isisd.h14
-rw-r--r--ldpd/accept.c16
-rw-r--r--ldpd/adjacency.c8
-rw-r--r--ldpd/control.c8
-rw-r--r--ldpd/interface.c8
-rw-r--r--ldpd/lde.c12
-rw-r--r--ldpd/lde.h4
-rw-r--r--ldpd/lde_lib.c4
-rw-r--r--ldpd/ldpd.c14
-rw-r--r--ldpd/ldpd.h26
-rw-r--r--ldpd/ldpe.c16
-rw-r--r--ldpd/ldpe.h22
-rw-r--r--ldpd/neighbor.c18
-rw-r--r--ldpd/packet.c18
-rw-r--r--lib/agentx.c12
-rw-r--r--lib/bfd.c4
-rw-r--r--lib/event.c134
-rw-r--r--lib/event.h62
-rw-r--r--lib/frr_pthread.c6
-rw-r--r--lib/frr_zmq.c4
-rw-r--r--lib/frr_zmq.h2
-rw-r--r--lib/grammar_sandbox_main.c6
-rw-r--r--lib/ldp_sync.h2
-rw-r--r--lib/libfrr.c8
-rw-r--r--lib/libfrr.h2
-rw-r--r--lib/libfrr_trace.h2
-rw-r--r--lib/log.c4
-rw-r--r--lib/mgmt_be_client.c20
-rw-r--r--lib/mgmt_fe_client.c20
-rw-r--r--lib/northbound_cli.c2
-rw-r--r--lib/northbound_confd.c8
-rw-r--r--lib/northbound_grpc.cpp10
-rw-r--r--lib/northbound_sysrepo.c4
-rw-r--r--lib/pullwr.c6
-rw-r--r--lib/resolver.c12
-rw-r--r--lib/resolver.h2
-rw-r--r--lib/sigevent.c4
-rw-r--r--lib/spf_backoff.c8
-rw-r--r--lib/systemd.c2
-rw-r--r--lib/vty.c16
-rw-r--r--lib/vty.h8
-rw-r--r--lib/wheel.c6
-rw-r--r--lib/wheel.h2
-rw-r--r--lib/workqueue.c2
-rw-r--r--lib/workqueue.h4
-rw-r--r--lib/yang.h2
-rw-r--r--lib/zclient.c6
-rw-r--r--lib/zclient.h6
-rw-r--r--lib/zlog.c2
-rw-r--r--lib/zlog_5424.c2
-rw-r--r--lib/zlog_5424.h4
-rw-r--r--mgmtd/mgmt_be_adapter.c10
-rw-r--r--mgmtd/mgmt_be_adapter.h10
-rw-r--r--mgmtd/mgmt_be_server.c4
-rw-r--r--mgmtd/mgmt_fe_adapter.c16
-rw-r--r--mgmtd/mgmt_fe_adapter.h8
-rw-r--r--mgmtd/mgmt_fe_server.c4
-rw-r--r--mgmtd/mgmt_txn.c24
-rw-r--r--nhrpd/netlink_arp.c4
-rw-r--r--nhrpd/nhrp_cache.c6
-rw-r--r--nhrpd/nhrp_event.c10
-rw-r--r--nhrpd/nhrp_multicast.c4
-rw-r--r--nhrpd/nhrp_nhs.c10
-rw-r--r--nhrpd/nhrp_packet.c2
-rw-r--r--nhrpd/nhrp_peer.c6
-rw-r--r--nhrpd/nhrp_shortcut.c6
-rw-r--r--nhrpd/nhrpd.h14
-rw-r--r--nhrpd/vici.c10
-rw-r--r--ospf6d/ospf6_area.h4
-rw-r--r--ospf6d/ospf6_asbr.c6
-rw-r--r--ospf6d/ospf6_gr.c2
-rw-r--r--ospf6d/ospf6_gr_helper.c2
-rw-r--r--ospf6d/ospf6_interface.c10
-rw-r--r--ospf6d/ospf6_interface.h28
-rw-r--r--ospf6d/ospf6_intra.c10
-rw-r--r--ospf6d/ospf6_intra.h12
-rw-r--r--ospf6d/ospf6_lsa.c8
-rw-r--r--ospf6d/ospf6_lsa.h8
-rw-r--r--ospf6d/ospf6_message.c20
-rw-r--r--ospf6d/ospf6_message.h20
-rw-r--r--ospf6d/ospf6_neighbor.c22
-rw-r--r--ospf6d/ospf6_neighbor.h38
-rw-r--r--ospf6d/ospf6_nssa.c2
-rw-r--r--ospf6d/ospf6_spf.c4
-rw-r--r--ospf6d/ospf6_top.c2
-rw-r--r--ospf6d/ospf6_top.h18
-rw-r--r--ospfclient/ospfclient.c8
-rw-r--r--ospfd/ospf_abr.c4
-rw-r--r--ospfd/ospf_apiserver.c8
-rw-r--r--ospfd/ospf_apiserver.h16
-rw-r--r--ospfd/ospf_asbr.c4
-rw-r--r--ospfd/ospf_ase.c2
-rw-r--r--ospfd/ospf_dump.c2
-rw-r--r--ospfd/ospf_dump.h2
-rw-r--r--ospfd/ospf_gr.c2
-rw-r--r--ospfd/ospf_gr.h2
-rw-r--r--ospfd/ospf_gr_helper.c2
-rw-r--r--ospfd/ospf_interface.h12
-rw-r--r--ospfd/ospf_ism.c6
-rw-r--r--ospfd/ospf_ism.h4
-rw-r--r--ospfd/ospf_ldp_sync.c2
-rw-r--r--ospfd/ospf_lsa.c10
-rw-r--r--ospfd/ospf_lsa.h6
-rw-r--r--ospfd/ospf_neighbor.h10
-rw-r--r--ospfd/ospf_nsm.c6
-rw-r--r--ospfd/ospf_nsm.h2
-rw-r--r--ospfd/ospf_opaque.c34
-rw-r--r--ospfd/ospf_packet.c20
-rw-r--r--ospfd/ospf_packet.h10
-rw-r--r--ospfd/ospf_spf.c2
-rw-r--r--ospfd/ospf_sr.c2
-rw-r--r--ospfd/ospf_sr.h2
-rw-r--r--ospfd/ospf_zebra.c4
-rw-r--r--ospfd/ospfd.c2
-rw-r--r--ospfd/ospfd.h43
-rw-r--r--pathd/path_pcep_controller.c50
-rw-r--r--pathd/path_pcep_controller.h16
-rw-r--r--pathd/path_pcep_lib.c8
-rw-r--r--pathd/path_pcep_pcc.h8
-rw-r--r--pathd/path_ted.c8
-rw-r--r--pathd/path_ted.h4
-rw-r--r--pathd/pathd.c8
-rw-r--r--pathd/pathd.h2
-rw-r--r--pimd/pim6_mld.c18
-rw-r--r--pimd/pim6_mld.h12
-rw-r--r--pimd/pim_assert.c2
-rw-r--r--pimd/pim_bsm.c4
-rw-r--r--pimd/pim_bsm.h4
-rw-r--r--pimd/pim_iface.h4
-rw-r--r--pimd/pim_ifchannel.c4
-rw-r--r--pimd/pim_ifchannel.h6
-rw-r--r--pimd/pim_igmp.c10
-rw-r--r--pimd/pim_igmp.h14
-rw-r--r--pimd/pim_igmpv3.c4
-rw-r--r--pimd/pim_instance.h8
-rw-r--r--pimd/pim_mlag.c4
-rw-r--r--pimd/pim_mroute.c2
-rw-r--r--pimd/pim_msdp.c10
-rw-r--r--pimd/pim_msdp.h18
-rw-r--r--pimd/pim_msdp_packet.c4
-rw-r--r--pimd/pim_msdp_packet.h2
-rw-r--r--pimd/pim_msdp_socket.c2
-rw-r--r--pimd/pim_neighbor.c4
-rw-r--r--pimd/pim_neighbor.h4
-rw-r--r--pimd/pim_pim.c6
-rw-r--r--pimd/pim_register.c2
-rw-r--r--pimd/pim_ssmpingd.c2
-rw-r--r--pimd/pim_ssmpingd.h2
-rw-r--r--pimd/pim_time.c6
-rw-r--r--pimd/pim_time.h6
-rw-r--r--pimd/pim_upstream.c8
-rw-r--r--pimd/pim_upstream.h8
-rw-r--r--pimd/pim_vxlan.c2
-rw-r--r--pimd/pim_vxlan.h2
-rw-r--r--pimd/pim_zebra.c2
-rw-r--r--pimd/pim_zlookup.c8
-rw-r--r--pimd/pim_zpthread.c2
-rw-r--r--ripd/rip_interface.c2
-rw-r--r--ripd/rip_peer.c2
-rw-r--r--ripd/ripd.c16
-rw-r--r--ripd/ripd.h16
-rw-r--r--ripngd/ripng_interface.c2
-rw-r--r--ripngd/ripng_peer.c2
-rw-r--r--ripngd/ripngd.c16
-rw-r--r--ripngd/ripngd.h16
-rw-r--r--sharpd/sharp_logpump.c2
-rw-r--r--tests/bgpd/test_packet.c2
-rw-r--r--tests/helpers/c/main.c4
-rw-r--r--tests/isisd/test_isis_spf.c2
-rw-r--r--tests/lib/cli/common_cli.c2
-rw-r--r--tests/lib/northbound/test_oper_data.c2
-rw-r--r--tests/lib/test_grpc.cpp8
-rw-r--r--tests/lib/test_heavy_thread.c2
-rw-r--r--tests/lib/test_segv.c2
-rw-r--r--tests/lib/test_sig.c2
-rw-r--r--tests/lib/test_timer_correctness.c6
-rw-r--r--tests/lib/test_timer_performance.c4
-rw-r--r--tests/lib/test_zmq.c2
-rw-r--r--tests/ospfd/test_ospf_spf.c2
-rw-r--r--vrrpd/vrrp.c10
-rw-r--r--vrrpd/vrrp.h8
-rw-r--r--vtysh/vtysh.c4
-rw-r--r--vtysh/vtysh_main.c6
-rw-r--r--watchfrr/watchfrr.c40
-rw-r--r--zebra/dplane_fpm_nl.c74
-rw-r--r--zebra/interface.c2
-rw-r--r--zebra/interface.h2
-rw-r--r--zebra/irdp.h6
-rw-r--r--zebra/irdp_main.c4
-rw-r--r--zebra/irdp_packet.c4
-rw-r--r--zebra/kernel_netlink.c2
-rw-r--r--zebra/kernel_socket.c2
-rw-r--r--zebra/main.c2
-rw-r--r--zebra/rib.h2
-rw-r--r--zebra/rtadv.c4
-rw-r--r--zebra/rtadv.h4
-rw-r--r--zebra/zebra_dplane.c18
-rw-r--r--zebra/zebra_evpn_mac.c4
-rw-r--r--zebra/zebra_evpn_mac.h4
-rw-r--r--zebra/zebra_evpn_mh.c4
-rw-r--r--zebra/zebra_evpn_mh.h4
-rw-r--r--zebra/zebra_evpn_neigh.c4
-rw-r--r--zebra/zebra_evpn_neigh.h4
-rw-r--r--zebra/zebra_fpm.c30
-rw-r--r--zebra/zebra_gr.c4
-rw-r--r--zebra/zebra_mlag.c10
-rw-r--r--zebra/zebra_mlag_private.c8
-rw-r--r--zebra/zebra_netns_notify.c10
-rw-r--r--zebra/zebra_nhg.c2
-rw-r--r--zebra/zebra_nhg.h2
-rw-r--r--zebra/zebra_ns.h2
-rw-r--r--zebra/zebra_opaque.c6
-rw-r--r--zebra/zebra_ptm.c8
-rw-r--r--zebra/zebra_ptm.h8
-rw-r--r--zebra/zebra_pw.c4
-rw-r--r--zebra/zebra_pw.h2
-rw-r--r--zebra/zebra_rib.c10
-rw-r--r--zebra/zebra_routemap.c4
-rw-r--r--zebra/zebra_router.h6
-rw-r--r--zebra/zserv.c12
-rw-r--r--zebra/zserv.h12
299 files changed, 1245 insertions, 1250 deletions
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 510415593..1cd913c76 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -37,11 +37,11 @@ Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek
DEFINE_MGROUP(BABELD, "babeld");
DEFINE_MTYPE_STATIC(BABELD, BABEL, "Babel Structure");
-static void babel_init_routing_process(struct thread *thread);
+static void babel_init_routing_process(struct event *thread);
static void babel_get_myid(void);
static void babel_initial_noise(void);
-static void babel_read_protocol(struct thread *thread);
-static void babel_main_loop(struct thread *thread);
+static void babel_read_protocol(struct event *thread);
+static void babel_main_loop(struct event *thread);
static void babel_set_timer(struct timeval *timeout);
static void babel_fill_with_next_timeout(struct timeval *tv);
static void
@@ -163,7 +163,7 @@ fail:
}
/* thread reading entries form others babel daemons */
-static void babel_read_protocol(struct thread *thread)
+static void babel_read_protocol(struct event *thread)
{
int rc;
struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT);
@@ -199,7 +199,7 @@ static void babel_read_protocol(struct thread *thread)
/* Zebra will give some information, especially about interfaces. This function
must be call with a litte timeout wich may give zebra the time to do his job,
making these inits have sense. */
-static void babel_init_routing_process(struct thread *thread)
+static void babel_init_routing_process(struct event *thread)
{
myseqno = (frr_weak_random() & 0xFFFF);
babel_get_myid();
@@ -311,7 +311,7 @@ babel_clean_routing_process(void)
}
/* Function used with timeout. */
-static void babel_main_loop(struct thread *thread)
+static void babel_main_loop(struct event *thread)
{
struct timeval tv;
struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT);
diff --git a/babeld/babeld.h b/babeld/babeld.h
index a9ffb7ee4..6c51af48a 100644
--- a/babeld/babeld.h
+++ b/babeld/babeld.h
@@ -84,8 +84,8 @@ Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek
struct babel
{
/* Babel threads. */
- struct thread *t_read; /* on Babel protocol's socket */
- struct thread *t_update; /* timers */
+ struct event *t_read; /* on Babel protocol's socket */
+ struct event *t_update; /* timers */
/* distribute_ctx */
struct distribute_ctx *distribute_ctx;
};
diff --git a/bfdd/bfd.c b/bfdd/bfd.c
index 2586c0b99..0ca2ca1f0 100644
--- a/bfdd/bfd.c
+++ b/bfdd/bfd.c
@@ -618,14 +618,14 @@ struct bfd_session *ptm_bfd_sess_find(struct bfd_pkt *cp,
return bfd_key_lookup(key);
}
-void bfd_xmt_cb(struct thread *t)
+void bfd_xmt_cb(struct event *t)
{
struct bfd_session *bs = THREAD_ARG(t);
ptm_bfd_xmt_TO(bs, 0);
}
-void bfd_echo_xmt_cb(struct thread *t)
+void bfd_echo_xmt_cb(struct event *t)
{
struct bfd_session *bs = THREAD_ARG(t);
@@ -634,7 +634,7 @@ void bfd_echo_xmt_cb(struct thread *t)
}
/* Was ptm_bfd_detect_TO() */
-void bfd_recvtimer_cb(struct thread *t)
+void bfd_recvtimer_cb(struct event *t)
{
struct bfd_session *bs = THREAD_ARG(t);
@@ -647,7 +647,7 @@ void bfd_recvtimer_cb(struct thread *t)
}
/* Was ptm_bfd_echo_detect_TO() */
-void bfd_echo_recvtimer_cb(struct thread *t)
+void bfd_echo_recvtimer_cb(struct event *t)
{
struct bfd_session *bs = THREAD_ARG(t);
diff --git a/bfdd/bfd.h b/bfdd/bfd.h
index 97e45bb2c..59b0494aa 100644
--- a/bfdd/bfd.h
+++ b/bfdd/bfd.h
@@ -265,12 +265,12 @@ struct bfd_session {
struct bfd_config_timers timers;
struct bfd_timers cur_timers;
uint64_t detect_TO;
- struct thread *echo_recvtimer_ev;
- struct thread *recvtimer_ev;
+ struct event *echo_recvtimer_ev;
+ struct event *recvtimer_ev;
uint64_t xmt_TO;
uint64_t echo_xmt_TO;
- struct thread *xmttimer_ev;
- struct thread *echo_xmttimer_ev;
+ struct event *xmttimer_ev;
+ struct event *echo_xmttimer_ev;
uint64_t echo_detect_TO;
/* software object state */
@@ -401,8 +401,8 @@ struct bfd_control_socket {
TAILQ_ENTRY(bfd_control_socket) bcs_entry;
int bcs_sd;
- struct thread *bcs_ev;
- struct thread *bcs_outev;
+ struct event *bcs_ev;
+ struct event *bcs_outev;
struct bcqueue bcs_bcqueue;
/* Notification data */
@@ -422,7 +422,7 @@ int control_init(const char *path);
void control_shutdown(void);
int control_notify(struct bfd_session *bs, uint8_t notify_state);
int control_notify_config(const char *op, struct bfd_session *bs);
-void control_accept(struct thread *t);
+void control_accept(struct event *t);
/*
@@ -439,7 +439,7 @@ struct bfd_vrf_global {
int bg_echov6;
struct vrf *vrf;
- struct thread *bg_ev[6];
+ struct event *bg_ev[6];
};
/* Forward declaration of data plane context struct. */
@@ -448,7 +448,7 @@ TAILQ_HEAD(dplane_queue, bfd_dplane_ctx);
struct bfd_global {
int bg_csock;
- struct thread *bg_csockev;
+ struct event *bg_csockev;
struct bcslist bg_bcslist;
struct pllist bg_pllist;
@@ -466,7 +466,7 @@ struct bfd_global {
/* Distributed BFD items. */
bool bg_use_dplane;
int bg_dplane_sock;
- struct thread *bg_dplane_sockev;
+ struct event *bg_dplane_sockev;
struct dplane_queue bg_dplaneq;
/* Debug options. */
@@ -553,7 +553,7 @@ void ptm_bfd_snd(struct bfd_session *bfd, int fbit);
void ptm_bfd_echo_snd(struct bfd_session *bfd);
void ptm_bfd_echo_fp_snd(struct bfd_session *bfd);
-void bfd_recv_cb(struct thread *t);
+void bfd_recv_cb(struct event *t);
/*
@@ -561,7 +561,7 @@ void bfd_recv_cb(struct thread *t);
*
* Contains the code related with event loop.
*/
-typedef void (*bfd_ev_cb)(struct thread *t);
+typedef void (*bfd_ev_cb)(struct event *t);
void bfd_recvtimer_update(struct bfd_session *bs);
void bfd_echo_recvtimer_update(struct bfd_session *bs);
@@ -688,10 +688,10 @@ unsigned long bfd_get_session_count(void);
/* Export callback functions for `event.c`. */
extern struct thread_master *master;
-void bfd_recvtimer_cb(struct thread *t);
-void bfd_echo_recvtimer_cb(struct thread *t);
-void bfd_xmt_cb(struct thread *t);
-void bfd_echo_xmt_cb(struct thread *t);
+void bfd_recvtimer_cb(struct event *t);
+void bfd_echo_recvtimer_cb(struct event *t);
+void bfd_xmt_cb(struct event *t);
+void bfd_echo_xmt_cb(struct event *t);
extern struct in6_addr zero_addr;
diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c
index 88a9310bc..05ed2702d 100644
--- a/bfdd/bfd_packet.c
+++ b/bfdd/bfd_packet.c
@@ -768,7 +768,7 @@ static void cp_debug(bool mhop, struct sockaddr_any *peer,
mhop ? "yes" : "no", peerstr, localstr, portstr, vrfstr);
}
-void bfd_recv_cb(struct thread *t)
+void bfd_recv_cb(struct event *t)
{
int sd = THREAD_FD(t);
struct bfd_session *bfd;
diff --git a/bfdd/control.c b/bfdd/control.c
index a11ed3d89..db9778a8e 100644
--- a/bfdd/control.c
+++ b/bfdd/control.c
@@ -39,8 +39,8 @@ struct bfd_notify_peer *control_notifypeer_find(struct bfd_control_socket *bcs,
struct bfd_control_socket *control_new(int sd);
static void control_free(struct bfd_control_socket *bcs);
static void control_reset_buf(struct bfd_control_buffer *bcb);
-static void control_read(struct thread *t);
-static void control_write(struct thread *t);
+static void control_read(struct event *t);
+static void control_write(struct event *t);
static void control_handle_request_add(struct bfd_control_socket *bcs,
struct bfd_control_msg *bcm);
@@ -142,7 +142,7 @@ void control_shutdown(void)
}
}
-void control_accept(struct thread *t)
+void control_accept(struct event *t)
{
int csock, sd = THREAD_FD(t);
@@ -379,7 +379,7 @@ static void control_reset_buf(struct bfd_control_buffer *bcb)
bcb->bcb_left = 0;
}
-static void control_read(struct thread *t)
+static void control_read(struct event *t)
{
struct bfd_control_socket *bcs = THREAD_ARG(t);
struct bfd_control_buffer *bcb = &bcs->bcs_bin;
@@ -514,7 +514,7 @@ schedule_next_read:
thread_add_read(master, control_read, bcs, sd, &bcs->bcs_ev);
}
-static void control_write(struct thread *t)
+static void control_write(struct event *t)
{
struct bfd_control_socket *bcs = THREAD_ARG(t);
struct bfd_control_buffer *bcb = bcs->bcs_bout;
diff --git a/bfdd/dplane.c b/bfdd/dplane.c
index 7d160e868..b2c52f543 100644
--- a/bfdd/dplane.c
+++ b/bfdd/dplane.c
@@ -63,11 +63,11 @@ struct bfd_dplane_ctx {
/** Output buffer data. */
struct stream *outbuf;
/** Input event data. */
- struct thread *inbufev;
+ struct event *inbufev;
/** Output event data. */
- struct thread *outbufev;
+ struct event *outbufev;
/** Connection event. */
- struct thread *connectev;
+ struct event *connectev;
/** Amount of bytes read. */
uint64_t in_bytes;
@@ -94,7 +94,7 @@ struct bfd_dplane_ctx {
*/
typedef void (*bfd_dplane_expect_cb)(struct bfddp_message *msg, void *arg);
-static void bfd_dplane_client_connect(struct thread *t);
+static void bfd_dplane_client_connect(struct event *t);
static bool bfd_dplane_client_connecting(struct bfd_dplane_ctx *bdc);
static void bfd_dplane_ctx_free(struct bfd_dplane_ctx *bdc);
static int _bfd_dplane_add_session(struct bfd_dplane_ctx *bdc,
@@ -312,7 +312,7 @@ static ssize_t bfd_dplane_flush(struct bfd_dplane_ctx *bdc)
return total;
}
-static void bfd_dplane_write(struct thread *t)
+static void bfd_dplane_write(struct event *t)
{
struct bfd_dplane_ctx *bdc = THREAD_ARG(t);
@@ -599,7 +599,7 @@ skip_read:
return 0;
}
-static void bfd_dplane_read(struct thread *t)
+static void bfd_dplane_read(struct event *t)
{
struct bfd_dplane_ctx *bdc = THREAD_ARG(t);
int rv;
@@ -819,7 +819,7 @@ static uint16_t bfd_dplane_request_counters(const struct bfd_session *bs)
/*
* Data plane listening socket.
*/
-static void bfd_dplane_accept(struct thread *t)
+static void bfd_dplane_accept(struct event *t)
{
struct bfd_global *bg = THREAD_ARG(t);
struct bfd_dplane_ctx *bdc;
@@ -899,7 +899,7 @@ static bool bfd_dplane_client_connecting(struct bfd_dplane_ctx *bdc)
}
}
-static void bfd_dplane_client_connect(struct thread *t)
+static void bfd_dplane_client_connect(struct event *t)
{
struct bfd_dplane_ctx *bdc = THREAD_ARG(t);
int rv, sock;
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index 6ade0fc38..1cce0d7df 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -1335,7 +1335,7 @@ static void bmp_stat_put_u32(struct stream *s, size_t *cnt, uint16_t type,
(*cnt)++;
}
-static void bmp_stats(struct thread *thread)
+static void bmp_stats(struct event *thread)
{
struct bmp_targets *bt = THREAD_ARG(thread);
struct stream *s;
@@ -1388,7 +1388,7 @@ static void bmp_stats(struct thread *thread)
}
/* read from the BMP socket to detect session termination */
-static void bmp_read(struct thread *t)
+static void bmp_read(struct event *t)
{
struct bmp *bmp = THREAD_ARG(t);
char buf[1024];
@@ -1492,7 +1492,7 @@ static struct bmp *bmp_open(struct bmp_targets *bt, int bmp_sock)
}
/* Accept BMP connection. */
-static void bmp_accept(struct thread *thread)
+static void bmp_accept(struct event *thread)
{
union sockunion su;
struct bmp_listener *bl = THREAD_ARG(thread);
@@ -1902,7 +1902,7 @@ static void bmp_active_resolved(struct resolver_query *resq, const char *errstr,
bmp_active_connect(ba);
}
-static void bmp_active_thread(struct thread *t)
+static void bmp_active_thread(struct event *t)
{
struct bmp_active *ba = THREAD_ARG(t);
socklen_t slen;
diff --git a/bgpd/bgp_bmp.h b/bgpd/bgp_bmp.h
index 0c909e139..ab7463fad 100644
--- a/bgpd/bgp_bmp.h
+++ b/bgpd/bgp_bmp.h
@@ -112,7 +112,7 @@ struct bmp {
int socket;
char remote[SU_ADDRSTRLEN + 6];
- struct thread *t_read;
+ struct event *t_read;
struct pullwr *pullwr;
@@ -176,7 +176,7 @@ struct bmp_active {
union sockunion addrs[8];
int socket;
const char *last_err;
- struct thread *t_timer, *t_read, *t_write;
+ struct event *t_timer, *t_read, *t_write;
};
/* config & state for passive / listening sockets */
@@ -190,7 +190,7 @@ struct bmp_listener {
union sockunion addr;
int port;
- struct thread *t_accept;
+ struct event *t_accept;
int sock;
};
@@ -226,7 +226,7 @@ struct bmp_targets {
struct bmp_actives_head actives;
- struct thread *t_stats;
+ struct event *t_stats;
struct bmp_session_head sessions;
struct bmp_qhash_head updhash;
diff --git a/bgpd/bgp_conditional_adv.c b/bgpd/bgp_conditional_adv.c
index 051e336e5..981853845 100644
--- a/bgpd/bgp_conditional_adv.c
+++ b/bgpd/bgp_conditional_adv.c
@@ -150,7 +150,7 @@ static void bgp_conditional_adv_routes(struct peer *peer, afi_t afi,
/* Handler of conditional advertisement timer event.
* Each route in the condition-map is evaluated.
*/
-static void bgp_conditional_adv_timer(struct thread *t)
+static void bgp_conditional_adv_timer(struct event *t)
{
afi_t afi;
safi_t safi;
diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c
index ba16a33fb..e8dca2a75 100644
--- a/bgpd/bgp_damp.c
+++ b/bgpd/bgp_damp.c
@@ -98,7 +98,7 @@ int bgp_damp_decay(time_t tdiff, int penalty, struct bgp_damp_config *bdc)
/* Handler of reuse timer event. Each route in the current reuse-list
is evaluated. RFC2439 Section 4.8.7. */
-static void bgp_reuse_timer(struct thread *t)
+static void bgp_reuse_timer(struct event *t)
{
struct bgp_damp_info *bdi;
struct bgp_damp_info *next;
diff --git a/bgpd/bgp_damp.h b/bgpd/bgp_damp.h
index 129e44416..5708e6fd5 100644
--- a/bgpd/bgp_damp.h
+++ b/bgpd/bgp_damp.h
@@ -92,7 +92,7 @@ struct bgp_damp_config {
struct bgp_damp_info *no_reuse_list;
/* Reuse timer thread per-set base. */
- struct thread *t_reuse;
+ struct event *t_reuse;
afi_t afi;
safi_t safi;
diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c
index 6aad4ff2a..25e921cff 100644
--- a/bgpd/bgp_dump.c
+++ b/bgpd/bgp_dump.c
@@ -69,11 +69,11 @@ struct bgp_dump {
char *interval_str;
- struct thread *t_interval;
+ struct event *t_interval;
};
static int bgp_dump_unset(struct bgp_dump *bgp_dump);
-static void bgp_dump_interval_func(struct thread *);
+static void bgp_dump_interval_func(struct event *);
/* BGP packet dump output buffer. */
struct stream *bgp_dump_obuf;
@@ -428,7 +428,7 @@ static unsigned int bgp_dump_routes_func(int afi, int first_run,
return seq;
}
-static void bgp_dump_interval_func(struct thread *t)
+static void bgp_dump_interval_func(struct event *t)
{
struct bgp_dump *bgp_dump;
bgp_dump = THREAD_ARG(t);
diff --git a/bgpd/bgp_evpn_mh.c b/bgpd/bgp_evpn_mh.c
index 1f3dfd656..bdee8a2fb 100644
--- a/bgpd/bgp_evpn_mh.c
+++ b/bgpd/bgp_evpn_mh.c
@@ -65,7 +65,7 @@ static void bgp_evpn_mac_update_on_es_local_chg(struct bgp_evpn_es *es,
bool is_local);
esi_t zero_esi_buf, *zero_esi = &zero_esi_buf;
-static void bgp_evpn_run_consistency_checks(struct thread *t);
+static void bgp_evpn_run_consistency_checks(struct event *t);
static void bgp_evpn_path_nh_info_free(struct bgp_path_evpn_nh_info *nh_info);
static void bgp_evpn_path_nh_unlink(struct bgp_path_evpn_nh_info *nh_info);
@@ -4360,7 +4360,7 @@ static uint32_t bgp_evpn_es_run_consistency_checks(struct bgp_evpn_es *es)
return proc_cnt;
}
-static void bgp_evpn_run_consistency_checks(struct thread *t)
+static void bgp_evpn_run_consistency_checks(struct event *t)
{
int proc_cnt = 0;
struct listnode *node;
diff --git a/bgpd/bgp_evpn_mh.h b/bgpd/bgp_evpn_mh.h
index 613fece4d..ee1f74989 100644
--- a/bgpd/bgp_evpn_mh.h
+++ b/bgpd/bgp_evpn_mh.h
@@ -299,7 +299,7 @@ struct bgp_evpn_mh_info {
/* List of ESs with pending/periodic processing */
struct list *pend_es_list;
/* periodic timer for running background consistency checks */
- struct thread *t_cons_check;
+ struct event *t_cons_check;
/* config knobs for optimizing or interop */
/* Generate EAD-EVI routes even if the ES is oper-down. This can be
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index dc6ce6b8e..79f0444e8 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -82,13 +82,13 @@ static const char *const bgp_event_str[] = {
function. */
/* BGP event function. */
-void bgp_event(struct thread *);
+void bgp_event(struct event *event);
/* BGP thread functions. */
-static void bgp_start_timer(struct thread *);
-static void bgp_connect_timer(struct thread *);
-static void bgp_holdtime_timer(struct thread *);
-static void bgp_delayopen_timer(struct thread *);
+static void bgp_start_timer(struct event *event);
+static void bgp_connect_timer(struct event *event);
+static void bgp_holdtime_timer(struct event *event);
+static void bgp_delayopen_timer(struct event *event);
/* BGP FSM functions. */
static enum bgp_fsm_state_progress bgp_start(struct peer *);
@@ -502,7 +502,7 @@ void bgp_timer_set(struct peer *peer)
/* BGP start timer. This function set BGP_Start event to thread value
and process event. */
-static void bgp_start_timer(struct thread *thread)
+static void bgp_start_timer(struct event *thread)
{
struct peer *peer;
@@ -516,7 +516,7 @@ static void bgp_start_timer(struct thread *thread)
}
/* BGP connect retry timer. */
-static void bgp_connect_timer(struct thread *thread)
+static void bgp_connect_timer(struct event *thread)
{
struct peer *peer;
@@ -540,7 +540,7 @@ static void bgp_connect_timer(struct thread *thread)
}
/* BGP holdtime timer. */
-static void bgp_holdtime_timer(struct thread *thread)
+static void bgp_holdtime_timer(struct event *thread)
{
atomic_size_t inq_count;
struct peer *peer;
@@ -571,7 +571,7 @@ static void bgp_holdtime_timer(struct thread *thread)
bgp_event(thread); /* bgp_event unlocks peer */
}
-void bgp_routeadv_timer(struct thread *thread)
+void bgp_routeadv_timer(struct event *thread)
{
struct peer *peer;
@@ -592,7 +592,7 @@ void bgp_routeadv_timer(struct thread *thread)
}
/* RFC 4271 DelayOpenTimer */
-void bgp_delayopen_timer(struct thread *thread)
+void bgp_delayopen_timer(struct event *thread)
{
struct peer *peer;
@@ -668,7 +668,7 @@ static void bgp_graceful_restart_timer_off(struct peer *peer)
bgp_timer_set(peer);
}
-static void bgp_llgr_stale_timer_expire(struct thread *thread)
+static void bgp_llgr_stale_timer_expire(struct event *thread)
{
struct peer_af *paf;
struct peer *peer;
@@ -770,7 +770,7 @@ static void bgp_set_llgr_stale(struct peer *peer, afi_t afi, safi_t safi)
}
}
-static void bgp_graceful_restart_timer_expire(struct thread *thread)
+static void bgp_graceful_restart_timer_expire(struct event *thread)
{
struct peer *peer, *tmp_peer;
struct listnode *node, *nnode;
@@ -836,7 +836,7 @@ static void bgp_graceful_restart_timer_expire(struct thread *thread)
bgp_graceful_restart_timer_off(peer);
}
-static void bgp_graceful_stale_timer_expire(struct thread *thread)
+static void bgp_graceful_stale_timer_expire(struct event *thread)
{
struct peer *peer;
afi_t afi;
@@ -855,7 +855,7 @@ static void bgp_graceful_stale_timer_expire(struct thread *thread)
}
/* Selection deferral timer processing function */
-static void bgp_graceful_deferral_timer_expire(struct thread *thread)
+static void bgp_graceful_deferral_timer_expire(struct event *thread)
{
struct afi_safi_info *info;
afi_t afi;
@@ -1125,7 +1125,7 @@ int bgp_fsm_error_subcode(int status)
}
/* The maxmed onstartup timer expiry callback. */
-static void bgp_maxmed_onstartup_timer(struct thread *thread)
+static void bgp_maxmed_onstartup_timer(struct event *thread)
{
struct bgp *bgp;
@@ -1167,7 +1167,7 @@ static void bgp_maxmed_onstartup_process_status_change(struct peer *peer)
}
/* The update delay timer expiry callback. */
-static void bgp_update_delay_timer(struct thread *thread)
+static void bgp_update_delay_timer(struct event *thread)
{
struct bgp *bgp;
@@ -1179,7 +1179,7 @@ static void bgp_update_delay_timer(struct thread *thread)
}
/* The establish wait timer expiry callback. */
-static void bgp_establish_wait_timer(struct thread *thread)
+static void bgp_establish_wait_timer(struct event *thread)
{
struct bgp *bgp;
@@ -1654,7 +1654,7 @@ bgp_stop_with_notify(struct peer *peer, uint8_t code, uint8_t sub_code)
* when the connection is established. A read event is triggered when the
* connection is closed. Thus we need to cancel whichever one did not occur.
*/
-static void bgp_connect_check(struct thread *thread)
+static void bgp_connect_check(struct event *thread)
{
int status;
socklen_t slen;
@@ -2572,7 +2572,7 @@ static const struct {
};
/* Execute event process. */
-void bgp_event(struct thread *thread)
+void bgp_event(struct event *thread)
{
enum bgp_fsm_events event;
struct peer *peer;
diff --git a/bgpd/bgp_fsm.h b/bgpd/bgp_fsm.h
index bd1a6adfe..432072ede 100644
--- a/bgpd/bgp_fsm.h
+++ b/bgpd/bgp_fsm.h
@@ -105,11 +105,11 @@
* Update FSM for peer based on whether we have valid nexthops or not.
*/
extern void bgp_fsm_nht_update(struct peer *peer, bool has_valid_nexthops);
-extern void bgp_event(struct thread *);
+extern void bgp_event(struct event *event);
extern int bgp_event_update(struct peer *, enum bgp_fsm_events event);
extern int bgp_stop(struct peer *peer);
extern void bgp_timer_set(struct peer *);
-extern void bgp_routeadv_timer(struct thread *);
+extern void bgp_routeadv_timer(struct event *event);
extern void bgp_fsm_change_status(struct peer *peer,
enum bgp_fsm_status status);
extern const char *const peer_down_str[];
diff --git a/bgpd/bgp_io.c b/bgpd/bgp_io.c
index 5dae39d40..6b8ae8448 100644
--- a/bgpd/bgp_io.c
+++ b/bgpd/bgp_io.c
@@ -31,8 +31,8 @@
/* forward declarations */
static uint16_t bgp_write(struct peer *);
static uint16_t bgp_read(struct peer *peer, int *code_p);
-static void bgp_process_writes(struct thread *);
-static void bgp_process_reads(struct thread *);
+static void bgp_process_writes(struct event *event);
+static void bgp_process_reads(struct event *event);
static bool validate_header(struct peer *);
/* generic i/o status codes */
@@ -108,7 +108,7 @@ void bgp_reads_off(struct peer *peer)
/*
* Called from I/O pthread when a file descriptor has become ready for writing.
*/
-static void bgp_process_writes(struct thread *thread)
+static void bgp_process_writes(struct event *thread)
{
static struct peer *peer;
peer = THREAD_ARG(thread);
@@ -210,7 +210,7 @@ static int read_ibuf_work(struct peer *peer)
* We read as much data as possible, process as many packets as we can and
* place them on peer->ibuf for secondary processing by the main thread.
*/
-static void bgp_process_reads(struct thread *thread)
+static void bgp_process_reads(struct event *thread)
{
/* clang-format off */
static struct peer *peer; /* peer to read from */
diff --git a/bgpd/bgp_labelpool.c b/bgpd/bgp_labelpool.c
index f0f207442..e04fb6eb2 100644
--- a/bgpd/bgp_labelpool.c
+++ b/bgpd/bgp_labelpool.c
@@ -1091,7 +1091,7 @@ struct lp_test {
struct timeval starttime;
struct skiplist *timestamps_alloc;
struct skiplist *timestamps_dealloc;
- struct thread *event_thread;
+ struct event *event_thread;
unsigned int counter[LPT_STAT_MAX];
};
@@ -1150,7 +1150,7 @@ static int test_cb(mpls_label_t label, void *labelid, bool allocated)
return 0;
}
-static void labelpool_test_event_handler(struct thread *thread)
+static void labelpool_test_event_handler(struct event *thread)
{
struct lp_test *tcb;
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 8fcb5b017..c10f33a2d 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -338,7 +338,7 @@ static void bgp_socket_set_buffer_size(const int fd)
}
/* Accept bgp connection. */
-static void bgp_accept(struct thread *thread)
+static void bgp_accept(struct event *thread)
{
int bgp_sock;
int accept_sock;
diff --git a/bgpd/bgp_network.h b/bgpd/bgp_network.h
index f21b219e2..cf0b4362c 100644
--- a/bgpd/bgp_network.h
+++ b/bgpd/bgp_network.h
@@ -11,7 +11,7 @@
struct bgp_listener {
int fd;
union sockunion su;
- struct thread *thread;
+ struct event *thread;
struct bgp *bgp;
char *name;
};
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index cb9de84cc..391332f4c 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -37,7 +37,7 @@ extern struct zclient *zclient;
static void register_zebra_rnh(struct bgp_nexthop_cache *bnc);
static void unregister_zebra_rnh(struct bgp_nexthop_cache *bnc);
static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p);
-static void bgp_nht_ifp_initial(struct thread *thread);
+static void bgp_nht_ifp_initial(struct event *thread);
static int bgp_isvalid_nexthop(struct bgp_nexthop_cache *bnc)
{
@@ -756,7 +756,7 @@ void bgp_nht_ifp_down(struct interface *ifp)
bgp_nht_ifp_handle(ifp, false);
}
-static void bgp_nht_ifp_initial(struct thread *thread)
+static void bgp_nht_ifp_initial(struct event *thread)
{
ifindex_t ifindex = THREAD_VAL(thread);
struct bgp *bgp = THREAD_ARG(thread);
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 97b26ea62..e12409591 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -442,7 +442,7 @@ static void bgp_write_proceed_actions(struct peer *peer)
* update group a peer belongs to, encode this information into packets, and
* enqueue the packets onto the peer's output buffer.
*/
-void bgp_generate_updgrp_packets(struct thread *thread)
+void bgp_generate_updgrp_packets(struct event *thread)
{
struct peer *peer = THREAD_ARG(thread);
@@ -1792,7 +1792,7 @@ static int bgp_keepalive_receive(struct peer *peer, bgp_size_t size)
return Receive_KEEPALIVE_message;
}
-static void bgp_refresh_stalepath_timer_expire(struct thread *thread)
+static void bgp_refresh_stalepath_timer_expire(struct event *thread)
{
struct peer_af *paf;
@@ -2867,7 +2867,7 @@ int bgp_capability_receive(struct peer *peer, bgp_size_t size)
* @param thread
* @return 0
*/
-void bgp_process_packet(struct thread *thread)
+void bgp_process_packet(struct event *thread)
{
/* Yes first of all get peer pointer. */
struct peer *peer; // peer
@@ -3044,7 +3044,7 @@ void bgp_send_delayed_eor(struct bgp *bgp)
* having the io pthread try to enqueue fsm events or mess with the peer
* struct.
*/
-void bgp_packet_process_error(struct thread *thread)
+void bgp_packet_process_error(struct event *thread)
{
struct peer *peer;
int code;
diff --git a/bgpd/bgp_packet.h b/bgpd/bgp_packet.h
index 2eb5693ae..c072bbc23 100644
--- a/bgpd/bgp_packet.h
+++ b/bgpd/bgp_packet.h
@@ -66,13 +66,13 @@ extern void bgp_check_update_delay(struct bgp *);
extern int bgp_packet_set_marker(struct stream *s, uint8_t type);
extern void bgp_packet_set_size(struct stream *s);
-extern void bgp_generate_updgrp_packets(struct thread *);
-extern void bgp_process_packet(struct thread *);
+extern void bgp_generate_updgrp_packets(struct event *event);
+extern void bgp_process_packet(struct event *event);
extern void bgp_send_delayed_eor(struct bgp *bgp);
/* Task callback to handle socket error encountered in the io pthread */
-void bgp_packet_process_error(struct thread *thread);
+void bgp_packet_process_error(struct event *thread);
extern struct bgp_notify
bgp_notify_decapsulate_hard_reset(struct bgp_notify *notify);
extern bool bgp_has_graceful_restart_notification(struct peer *peer);
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index efa367a56..3dcddf49e 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -2618,7 +2618,7 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi,
return true;
}
-static void bgp_route_select_timer_expire(struct thread *thread)
+static void bgp_route_select_timer_expire(struct event *thread)
{
struct afi_safi_info *info;
afi_t afi;
@@ -3381,7 +3381,7 @@ void bgp_best_path_select_defer(struct bgp *bgp, afi_t afi, safi_t safi)
struct afi_safi_info *thread_info;
if (bgp->gr_info[afi][safi].t_route_select) {
- struct thread *t = bgp->gr_info[afi][safi].t_route_select;
+ struct event *t = bgp->gr_info[afi][safi].t_route_select;
thread_info = THREAD_ARG(t);
XFREE(MTYPE_TMP, thread_info);
@@ -3585,7 +3585,7 @@ void bgp_add_eoiu_mark(struct bgp *bgp)
work_queue_add(bgp->process_queue, pqnode);
}
-static void bgp_maximum_prefix_restart_timer(struct thread *thread)
+static void bgp_maximum_prefix_restart_timer(struct event *thread)
{
struct peer *peer;
@@ -5055,7 +5055,7 @@ void bgp_stop_announce_route_timer(struct peer_af *paf)
* Callback that is invoked when the route announcement timer for a
* peer_af expires.
*/
-static void bgp_announce_route_timer_expired(struct thread *t)
+static void bgp_announce_route_timer_expired(struct event *t)
{
struct peer_af *paf;
struct peer *peer;
@@ -5215,7 +5215,7 @@ static void bgp_soft_reconfig_table(struct peer *peer, afi_t afi, safi_t safi,
* Without splitting the full job into several part,
* vtysh waits for the job to finish before responding to a BGP command
*/
-static void bgp_soft_reconfig_table_task(struct thread *thread)
+static void bgp_soft_reconfig_table_task(struct event *thread)
{
uint32_t iter, max_iter;
struct bgp_dest *dest;
@@ -13342,7 +13342,7 @@ static void bgp_table_stats_rn(struct bgp_dest *dest, struct bgp_dest *top,
}
}
-static void bgp_table_stats_walker(struct thread *t)
+static void bgp_table_stats_walker(struct event *t)
{
struct bgp_dest *dest, *ndest;
struct bgp_dest *top;
@@ -13739,7 +13739,7 @@ static void bgp_peer_count_proc(struct bgp_dest *rn, struct peer_pcounts *pc)
}
}
-static void bgp_peer_count_walker(struct thread *t)
+static void bgp_peer_count_walker(struct event *t)
{
struct bgp_dest *rn, *rm;
const struct bgp_table *table;
diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h
index c45dcaa51..b48e8eda1 100644
--- a/bgpd/bgp_route.h
+++ b/bgpd/bgp_route.h
@@ -182,7 +182,7 @@ struct bgp_path_info_extra {
} export;
struct {
- struct thread *timer;
+ struct event *timer;
void *hme; /* encap monitor, if this is a VPN route */
struct prefix_rd
rd; /* import: route's route-distinguisher */
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index fa9d23874..db4d17073 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -4344,7 +4344,7 @@ static void bgp_route_map_process_update_cb(char *rmap_name)
vpn_policy_routemap_event(rmap_name);
}
-void bgp_route_map_update_timer(struct thread *thread)
+void bgp_route_map_update_timer(struct event *thread)
{
route_map_walk_update_list(bgp_route_map_process_update_cb);
}
diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c
index 2aceca8bd..efaa3c363 100644
--- a/bgpd/bgp_rpki.c
+++ b/bgpd/bgp_rpki.c
@@ -53,7 +53,7 @@ DEFINE_MTYPE_STATIC(BGPD, BGP_RPKI_REVALIDATE, "BGP RPKI Revalidation");
#define RETRY_INTERVAL_DEFAULT 600
#define BGP_RPKI_CACHE_SERVER_SYNC_RETRY_TIMEOUT 3
-static struct thread *t_rpki_sync;
+static struct event *t_rpki_sync;
#define RPKI_DEBUG(...) \
if (rpki_debug) { \
@@ -381,7 +381,7 @@ struct rpki_revalidate_prefix {
safi_t safi;
};
-static void rpki_revalidate_prefix(struct thread *thread)
+static void rpki_revalidate_prefix(struct event *thread)
{
struct rpki_revalidate_prefix *rrp = THREAD_ARG(thread);
struct bgp_dest *match, *node;
@@ -402,7 +402,7 @@ static void rpki_revalidate_prefix(struct thread *thread)
XFREE(MTYPE_BGP_RPKI_REVALIDATE, rrp);
}
-static void bgpd_sync_callback(struct thread *thread)
+static void bgpd_sync_callback(struct event *thread)
{
struct bgp *bgp;
struct listnode *node;
@@ -489,7 +489,7 @@ struct rpki_revalidate_peer {
struct peer *peer;
};
-static void bgp_rpki_revalidate_peer(struct thread *thread)
+static void bgp_rpki_revalidate_peer(struct event *thread)
{
struct rpki_revalidate_peer *rvp = THREAD_ARG(thread);
@@ -631,7 +631,7 @@ static int bgp_rpki_module_init(void)
return 0;
}
-static void sync_expired(struct thread *thread)
+static void sync_expired(struct event *thread)
{
if (!rtr_mgr_conf_in_sync(rtr_config)) {
RPKI_DEBUG("rtr_mgr is not synced, retrying.");
diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h
index 997efee9f..9027af5ba 100644
--- a/bgpd/bgp_table.h
+++ b/bgpd/bgp_table.h
@@ -29,7 +29,7 @@ struct bgp_table {
/* soft_reconfig_table in progress */
bool soft_reconfig_init;
- struct thread *soft_reconfig_thread;
+ struct event *soft_reconfig_thread;
/* list of peers on which soft_reconfig_table has to run */
struct list *soft_reconfig_peers;
diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c
index 68bfb4c13..e01df10d3 100644
--- a/bgpd/bgp_updgrp.c
+++ b/bgpd/bgp_updgrp.c
@@ -1418,7 +1418,7 @@ bool update_subgroup_check_merge(struct update_subgroup *subgrp,
/*
* update_subgroup_merge_check_thread_cb
*/
-static void update_subgroup_merge_check_thread_cb(struct thread *thread)
+static void update_subgroup_merge_check_thread_cb(struct event *thread)
{
struct update_subgroup *subgrp;
@@ -2107,7 +2107,7 @@ update_group_default_originate_route_map_walkcb(struct update_group *updgrp,
return UPDWALK_CONTINUE;
}
-void update_group_refresh_default_originate_route_map(struct thread *thread)
+void update_group_refresh_default_originate_route_map(struct event *thread)
{
struct bgp *bgp;
char reason[] = "refresh default-originate route-map";
diff --git a/bgpd/bgp_updgrp.h b/bgpd/bgp_updgrp.h
index 2b2fadcdf..67c384ba0 100644
--- a/bgpd/bgp_updgrp.h
+++ b/bgpd/bgp_updgrp.h
@@ -197,10 +197,10 @@ struct update_subgroup {
/* announcement attribute hash */
struct hash *hash;
- struct thread *t_coalesce;
+ struct event *t_coalesce;
uint32_t v_coalesce;
- struct thread *t_merge_check;
+ struct event *t_merge_check;
/* table version that the subgroup has caught up to. */
uint64_t version;
@@ -373,7 +373,7 @@ extern void update_group_af_walk(struct bgp *bgp, afi_t afi, safi_t safi,
extern void update_group_walk(struct bgp *bgp, updgrp_walkcb cb, void *ctx);
extern void update_group_periodic_merge(struct bgp *bgp);
extern void
-update_group_refresh_default_originate_route_map(struct thread *thread);
+update_group_refresh_default_originate_route_map(struct event *thread);
extern void update_group_start_advtimer(struct bgp *bgp);
extern void update_subgroup_inherit_info(struct update_subgroup *to,
diff --git a/bgpd/bgp_updgrp_adv.c b/bgpd/bgp_updgrp_adv.c
index 181d57813..f6321a368 100644
--- a/bgpd/bgp_updgrp_adv.c
+++ b/bgpd/bgp_updgrp_adv.c
@@ -298,7 +298,7 @@ static void updgrp_show_adj(struct bgp *bgp, afi_t afi, safi_t safi,
update_group_af_walk(bgp, afi, safi, updgrp_show_adj_walkcb, &ctx);
}
-static void subgroup_coalesce_timer(struct thread *thread)
+static void subgroup_coalesce_timer(struct event *thread)
{
struct update_subgroup *subgrp;
struct bgp *bgp;
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 3bc64c349..423348849 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -18764,14 +18764,14 @@ static const struct cmd_variable_handler bgp_var_peergroup[] = {
DEFINE_HOOK(bgp_config_end, (struct bgp *bgp), (bgp));
-static struct thread *t_bgp_cfg;
+static struct event *t_bgp_cfg;
bool bgp_config_inprocess(void)
{
return thread_is_scheduled(t_bgp_cfg);
}
-static void bgp_config_finish(struct thread *t)
+static void bgp_config_finish(struct event *t)
{
struct listnode *node;
struct bgp *bgp;
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index d4c98a2c7..11761ff58 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1046,14 +1046,14 @@ static bool bgp_table_map_apply(struct route_map *map, const struct prefix *p,
return false;
}
-static struct thread *bgp_tm_thread_connect;
+static struct event *bgp_tm_thread_connect;
static bool bgp_tm_status_connected;
static bool bgp_tm_chunk_obtained;
#define BGP_FLOWSPEC_TABLE_CHUNK 100000
static uint32_t bgp_tm_min, bgp_tm_max, bgp_tm_chunk_size;
struct bgp *bgp_tm_bgp;
-static void bgp_zebra_tm_connect(struct thread *t)
+static void bgp_zebra_tm_connect(struct event *t)
{
struct zclient *zclient;
int delay = 10, ret = 0;
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index c7cd80b98..6a71d9dfe 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -3197,7 +3197,7 @@ int peer_group_bind(struct bgp *bgp, union sockunion *su, struct peer *peer,
return 0;
}
-static void bgp_startup_timer_expire(struct thread *thread)
+static void bgp_startup_timer_expire(struct event *thread)
{
struct bgp *bgp;
@@ -3761,7 +3761,7 @@ int bgp_delete(struct bgp *bgp)
/* Delete the graceful restart info */
FOREACH_AFI_SAFI (afi, safi) {
- struct thread *t;
+ struct event *t;
gr_info = &bgp->gr_info[afi][safi];
if (!gr_info)
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index c0dd8d5ef..ff93e0ee5 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -126,7 +126,7 @@ struct bgp_master {
uint64_t subgrp_idspace;
/* timer to dampen route map changes */
- struct thread *t_rmap_update; /* Handle route map updates */
+ struct event *t_rmap_update; /* Handle route map updates */
uint32_t rmap_update_timer; /* Route map update timer */
#define RMAP_DEFAULT_UPDATE_TIMER 5 /* disabled by default */
@@ -266,11 +266,11 @@ struct graceful_restart_info {
/* Count of EOR received */
uint32_t eor_received;
/* Deferral Timer */
- struct thread *t_select_deferral;
+ struct event *t_select_deferral;
/* Routes Deferred */
uint32_t gr_deferred;
/* Best route select */
- struct thread *t_route_select;
+ struct event *t_route_select;
/* AFI, SAFI enabled */
bool af_enabled[AFI_MAX][SAFI_MAX];
/* Route update completed */
@@ -406,15 +406,16 @@ struct bgp {
struct as_confed *confed_peers;
int confed_peers_cnt;
- struct thread
- *t_startup; /* start-up timer on only once at the beginning */
+ /* start-up timer on only once at the beginning */
+ struct event *t_startup;
uint32_t v_maxmed_onstartup; /* Duration of max-med on start-up */
#define BGP_MAXMED_ONSTARTUP_UNCONFIGURED 0 /* 0 means off, its the default */
uint32_t maxmed_onstartup_value; /* Max-med value when active on
start-up */
- struct thread
- *t_maxmed_onstartup; /* non-null when max-med onstartup is on */
+
+ /* non-null when max-med onstartup is on */
+ struct event *t_maxmed_onstartup;
uint8_t maxmed_onstartup_over; /* Flag to make it effective only once */
bool v_maxmed_admin; /* true/false if max-med administrative is on/off
@@ -428,9 +429,9 @@ struct bgp {
uint32_t maxmed_value; /* Max-med value when its active */
/* BGP update delay on startup */
- struct thread *t_update_delay;
- struct thread *t_establish_wait;
- struct thread *t_revalidate[AFI_MAX][SAFI_MAX];
+ struct event *t_update_delay;
+ struct event *t_establish_wait;
+ struct event *t_revalidate[AFI_MAX][SAFI_MAX];
uint8_t update_delay_over;
uint8_t main_zebra_update_hold;
@@ -590,7 +591,7 @@ struct bgp {
struct hash *pbr_action_hash;
/* timer to re-evaluate neighbor default-originate route-maps */
- struct thread *t_rmap_def_originate_eval;
+ struct event *t_rmap_def_originate_eval;
#define RMAP_DEFAULT_ORIGINATE_EVAL_TIMER 5
/* BGP distance configuration. */
@@ -769,7 +770,7 @@ struct bgp {
/* BGP Conditional advertisement */
uint32_t condition_check_period;
uint32_t condition_filter_count;
- struct thread *t_condition_check;
+ struct event *t_condition_check;
/* BGP VPN SRv6 backend */
bool srv6_enabled;
@@ -978,7 +979,7 @@ struct peer_af {
/*
* Trigger timer for bgp_announce_route().
*/
- struct thread *t_announce_route;
+ struct event *t_announce_route;
afi_t afi;
safi_t safi;
@@ -1509,24 +1510,24 @@ struct peer {
_Atomic uint32_t v_gr_restart;
/* Threads. */
- struct thread *t_read;
- struct thread *t_write;
- struct thread *t_start;
- struct thread *t_connect_check_r;
- struct thread *t_connect_check_w;
- struct thread *t_connect;
- struct thread *t_holdtime;
- struct thread *t_routeadv;
- struct thread *t_delayopen;
- struct thread *t_pmax_restart;
- struct thread *t_gr_restart;
- struct thread *t_gr_stale;
- struct thread *t_llgr_stale[AFI_MAX][SAFI_MAX];
- struct thread *t_revalidate_all[AFI_MAX][SAFI_MAX];
- struct thread *t_generate_updgrp_packets;
- struct thread *t_process_packet;
- struct thread *t_process_packet_error;
- struct thread *t_refresh_stalepath;
+ struct event *t_read;
+ struct event *t_write;
+ struct event *t_start;
+ struct event *t_connect_check_r;
+ struct event *t_connect_check_w;
+ struct event *t_connect;
+ struct event *t_holdtime;
+ struct event *t_routeadv;
+ struct event *t_delayopen;
+ struct event *t_pmax_restart;
+ struct event *t_gr_restart;
+ struct event *t_gr_stale;
+ struct event *t_llgr_stale[AFI_MAX][SAFI_MAX];
+ struct event *t_revalidate_all[AFI_MAX][SAFI_MAX];
+ struct event *t_generate_updgrp_packets;
+ struct event *t_process_packet;
+ struct event *t_process_packet_error;
+ struct event *t_refresh_stalepath;
/* Thread flags. */
_Atomic uint32_t thread_flags;
@@ -2363,7 +2364,7 @@ extern int peer_ttl_security_hops_unset(struct peer *);
extern void peer_tx_shutdown_message_set(struct peer *, const char *msg);
extern void peer_tx_shutdown_message_unset(struct peer *);
-extern void bgp_route_map_update_timer(struct thread *thread);
+extern void bgp_route_map_update_timer(struct event *thread);
extern const char *bgp_get_name_by_role(uint8_t role);
extern enum asnotation_mode bgp_get_asnotation(struct bgp *bgp);
diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c
index 5fb2c5046..92b580ee1 100644
--- a/bgpd/rfapi/rfapi_import.c
+++ b/bgpd/rfapi/rfapi_import.c
@@ -2345,7 +2345,7 @@ static void rfapiMonitorEncapDelete(struct bgp_path_info *vpn_bpi)
/*
* Timer callback for withdraw
*/
-static void rfapiWithdrawTimerVPN(struct thread *t)
+static void rfapiWithdrawTimerVPN(struct event *t)
{
struct rfapi_withdraw *wcb = THREAD_ARG(t);
struct bgp_path_info *bpi = wcb->info;
@@ -2654,7 +2654,7 @@ rfapiWithdrawEncapUpdateCachedUn(struct rfapi_import_table *import_table,
return 0;
}
-static void rfapiWithdrawTimerEncap(struct thread *t)
+static void rfapiWithdrawTimerEncap(struct event *t)
{
struct rfapi_withdraw *wcb = THREAD_ARG(t);
struct bgp_path_info *bpi = wcb->info;
@@ -2739,7 +2739,7 @@ static void
rfapiBiStartWithdrawTimer(struct rfapi_import_table *import_table,
struct agg_node *rn, struct bgp_path_info *bpi,
afi_t afi, safi_t safi,
- void (*timer_service_func)(struct thread *))
+ void (*timer_service_func)(struct event *))
{
uint32_t lifetime;
struct rfapi_withdraw *wcb;
@@ -2831,7 +2831,7 @@ static void rfapiExpireEncapNow(struct rfapi_import_table *it,
struct agg_node *rn, struct bgp_path_info *bpi)
{
struct rfapi_withdraw *wcb;
- struct thread t;
+ struct event t;
/*
* pretend we're an expiring timer
@@ -3094,7 +3094,7 @@ static void rfapiBgpInfoFilteredImportEncap(
* bpi
*/
struct rfapi_withdraw *wcb;
- struct thread t;
+ struct event t;
/*
* pretend we're an expiring timer
@@ -3305,7 +3305,7 @@ static void rfapiExpireVpnNow(struct rfapi_import_table *it,
int lockoffset)
{
struct rfapi_withdraw *wcb;
- struct thread t;
+ struct event t;
/*
* pretend we're an expiring timer
@@ -4046,7 +4046,7 @@ static void rfapiProcessPeerDownRt(struct peer *peer,
struct agg_node *rn;
struct bgp_path_info *bpi;
struct agg_table *rt = NULL;
- void (*timer_service_func)(struct thread *) = NULL;
+ void (*timer_service_func)(struct event *) = NULL;
assert(afi == AFI_IP || afi == AFI_IP6);
diff --git a/bgpd/rfapi/rfapi_monitor.c b/bgpd/rfapi/rfapi_monitor.c
index f169a7808..c69161841 100644
--- a/bgpd/rfapi/rfapi_monitor.c
+++ b/bgpd/rfapi/rfapi_monitor.c
@@ -730,7 +730,7 @@ void rfapiMonitorResponseRemovalOn(struct bgp *bgp)
bgp->rfapi_cfg->flags &= ~BGP_VNC_CONFIG_RESPONSE_REMOVAL_DISABLE;
}
-static void rfapiMonitorTimerExpire(struct thread *t)
+static void rfapiMonitorTimerExpire(struct event *t)
{
struct rfapi_monitor_vpn *m = THREAD_ARG(t);
@@ -1036,7 +1036,7 @@ void rfapiMonitorMovedUp(struct rfapi_import_table *import_table,
}
}
-static void rfapiMonitorEthTimerExpire(struct thread *t)
+static void rfapiMonitorEthTimerExpire(struct event *t)
{
struct rfapi_monitor_eth *m = THREAD_ARG(t);
diff --git a/bgpd/rfapi/rfapi_monitor.h b/bgpd/rfapi/rfapi_monitor.h
index 68ba5a48d..3200079b3 100644
--- a/bgpd/rfapi/rfapi_monitor.h
+++ b/bgpd/rfapi/rfapi_monitor.h
@@ -25,7 +25,7 @@ struct rfapi_monitor_vpn {
#define RFAPI_MON_FLAG_NEEDCALLBACK 0x00000001 /* deferred callback */
// int dcount; /* debugging counter */
- struct thread *timer;
+ struct event *timer;
};
struct rfapi_monitor_encap {
@@ -41,7 +41,7 @@ struct rfapi_monitor_eth {
struct rfapi_descriptor *rfd; /* which NVE requested the route */
struct ethaddr macaddr;
uint32_t logical_net_id;
- struct thread *timer;
+ struct event *timer;
};
/*
diff --git a/bgpd/rfapi/rfapi_rib.c b/bgpd/rfapi/rfapi_rib.c
index f727f24f1..7000fbf90 100644
--- a/bgpd/rfapi/rfapi_rib.c
+++ b/bgpd/rfapi/rfapi_rib.c
@@ -278,7 +278,7 @@ struct rfapi_rib_tcb {
/*
* remove route from rib
*/
-static void rfapiRibExpireTimer(struct thread *t)
+static void rfapiRibExpireTimer(struct event *t)
{
struct rfapi_rib_tcb *tcb = THREAD_ARG(t);
diff --git a/bgpd/rfapi/rfapi_rib.h b/bgpd/rfapi/rfapi_rib.h
index 1b626bd2e..5fa838bd3 100644
--- a/bgpd/rfapi/rfapi_rib.h
+++ b/bgpd/rfapi/rfapi_rib.h
@@ -61,7 +61,7 @@ struct rfapi_info {
struct bgp_tea_options *tea_options;
struct rfapi_un_option *un_options;
struct rfapi_vn_option *vn_options;
- struct thread *timer;
+ struct event *timer;
};
/*
diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c
index 2b768b8f8..b907c24c3 100644
--- a/bgpd/rfapi/rfapi_vty.c
+++ b/bgpd/rfapi/rfapi_vty.c
@@ -516,8 +516,7 @@ void rfapiPrintBi(void *stream, struct bgp_path_info *bpi)
if (CHECK_FLAG(bpi->flags, BGP_PATH_REMOVED) && bpi->extra
&& bpi->extra->vnc.import.timer) {
- struct thread *t =
- (struct thread *)bpi->extra->vnc.import.timer;
+ struct event *t = (struct event *)bpi->extra->vnc.import.timer;
r = snprintf(p, REMAIN, " [%4lu] ",
thread_timer_remain_second(t));
INCP;
@@ -1114,8 +1113,7 @@ static int rfapiPrintRemoteRegBi(struct bgp *bgp, void *stream,
time_t age;
char buf_age[BUFSIZ];
- struct thread *t =
- (struct thread *)bpi->extra->vnc.import.timer;
+ struct event *t = (struct event *)bpi->extra->vnc.import.timer;
remaining = thread_timer_remain_second(t);
#ifdef RFAPI_REGISTRATIONS_REPORT_AGE
diff --git a/bgpd/rfapi/vnc_export_bgp.c b/bgpd/rfapi/vnc_export_bgp.c
index 544922044..ef943fa40 100644
--- a/bgpd/rfapi/vnc_export_bgp.c
+++ b/bgpd/rfapi/vnc_export_bgp.c
@@ -1704,7 +1704,7 @@ void vnc_direct_bgp_rh_add_route(struct bgp *bgp, afi_t afi,
bgp_attr_unintern(&iattr);
}
-static void vncExportWithdrawTimer(struct thread *t)
+static void vncExportWithdrawTimer(struct event *t)
{
struct vnc_export_info *eti = THREAD_ARG(t);
const struct prefix *p = agg_node_get_prefix(eti->node);
diff --git a/bgpd/rfapi/vnc_export_table.h b/bgpd/rfapi/vnc_export_table.h
index 5716570cb..957e0432e 100644
--- a/bgpd/rfapi/vnc_export_table.h
+++ b/bgpd/rfapi/vnc_export_table.h
@@ -29,7 +29,7 @@ struct vnc_export_info {
uint8_t type;
uint8_t subtype;
uint32_t lifetime;
- struct thread *timer;
+ struct event *timer;
};
extern struct agg_node *vnc_etn_get(struct bgp *bgp, vnc_export_type_t type,
diff --git a/doc/developer/logging.rst b/doc/developer/logging.rst
index e262f6af9..b7021b69a 100644
--- a/doc/developer/logging.rst
+++ b/doc/developer/logging.rst
@@ -335,16 +335,16 @@ Time/interval formats
FRR library helper formats
^^^^^^^^^^^^^^^^^^^^^^^^^^
-.. frrfmt:: %pTH (struct thread *)
+.. frrfmt:: %pTH (struct event *)
- Print remaining time on timer thread. Interval-printing flag characters
+ Print remaining time on timer event. Interval-printing flag characters
listed above for ``%pTV`` can be added, e.g. ``%pTHtx``.
``NULL`` pointers are printed as ``-``.
-.. frrfmt:: %pTHD (struct thread *)
+.. frrfmt:: %pTHD (struct event *)
- Print debugging information for given thread. Sample output:
+ Print debugging information for given event. Sample output:
.. code-block:: none
diff --git a/doc/developer/process-architecture.rst b/doc/developer/process-architecture.rst
index 4f6cfcc7c..0773f47b0 100644
--- a/doc/developer/process-architecture.rst
+++ b/doc/developer/process-architecture.rst
@@ -28,7 +28,7 @@ within the event system are variations on the term "thread". The primary
datastructure that holds the state of an event loop in this system is called a
"threadmaster". Events scheduled on the event loop - what would today be called
an 'event' or 'task' in systems such as libevent - are called "threads" and the
-datastructure for them is ``struct thread``. To add to the confusion, these
+datastructure for them is ``struct event``. To add to the confusion, these
"threads" have various types, one of which is "event". To hopefully avoid some
of this confusion, this document refers to these "threads" as a 'task' except
where the datastructures are explicitly named. When they are explicitly named,
@@ -80,8 +80,8 @@ are given by integer macros in :file:`event.h` and are:
Type used internally for tasks on the ready queue.
``THREAD_UNUSED``
- Type used internally for ``struct thread`` objects that aren't being used.
- The event system pools ``struct thread`` to avoid heap allocations; this is
+ Type used internally for ``struct event`` objects that aren't being used.
+ The event system pools ``struct event`` to avoid heap allocations; this is
the type they have when they're in the pool.
``THREAD_EXECUTE``
@@ -95,9 +95,9 @@ irrelevant for the time being) for the specific type. For example, to add a
::
- thread_add_read(struct thread_master *master, int (*handler)(struct thread *), void *arg, int fd, struct thread **ref);
+ thread_add_read(struct thread_master *master, int (*handler)(struct event *), void *arg, int fd, struct event **ref);
-The ``struct thread`` is then created and added to the appropriate internal
+The ``struct event`` is then created and added to the appropriate internal
datastructure within the ``threadmaster``. Note that the ``READ`` and
``WRITE`` tasks are independent - a ``READ`` task only tests for
readability, for example.
@@ -133,7 +133,7 @@ illustrated at the bottom.
Mapping the general names used in the figure to specific FRR functions:
-- ``task`` is ``struct thread *``
+- ``task`` is ``struct event *``
- ``fetch`` is ``thread_fetch()``
- ``exec()`` is ``thread_call``
- ``cancel()`` is ``thread_cancel()``
diff --git a/doc/developer/rcu.rst b/doc/developer/rcu.rst
index ac4405121..4fd56587a 100644
--- a/doc/developer/rcu.rst
+++ b/doc/developer/rcu.rst
@@ -120,7 +120,7 @@ atomic ops & datastructures with other types of locking, e.g. rwlocks.
The ``thread_master`` code currently always holds RCU everywhere, except
while doing the actual ``poll()`` syscall. This is both an optimization as
well as an "easement" into getting RCU going. The current implementation
- contract is that any ``struct thread *`` callback is called with a RCU
+ contract is that any ``struct event *`` callback is called with a RCU
holding depth of 1, and that this is owned by the thread so it may (should)
drop and reacquire it when doing some longer-running work.
diff --git a/eigrpd/eigrp_filter.c b/eigrpd/eigrp_filter.c
index 534b4fef5..a4d59db6b 100644
--- a/eigrpd/eigrp_filter.c
+++ b/eigrpd/eigrp_filter.c
@@ -242,7 +242,7 @@ void eigrp_distribute_update_all_wrapper(struct access_list *notused)
* Called when 10sec waiting time expire and
* executes Graceful restart for whole process
*/
-void eigrp_distribute_timer_process(struct thread *thread)
+void eigrp_distribute_timer_process(struct event *thread)
{
struct eigrp *eigrp;
@@ -263,7 +263,7 @@ void eigrp_distribute_timer_process(struct thread *thread)
* Called when 10sec waiting time expire and
* executes Graceful restart for interface
*/
-void eigrp_distribute_timer_interface(struct thread *thread)
+void eigrp_distribute_timer_interface(struct event *thread)
{
struct eigrp_interface *ei;
diff --git a/eigrpd/eigrp_filter.h b/eigrpd/eigrp_filter.h
index 493ba08f7..dc8af8f53 100644
--- a/eigrpd/eigrp_filter.h
+++ b/eigrpd/eigrp_filter.h
@@ -23,7 +23,7 @@ extern void eigrp_distribute_update(struct distribute_ctx *ctx,
extern void eigrp_distribute_update_interface(struct interface *ifp);
extern void eigrp_distribute_update_all(struct prefix_list *plist);
extern void eigrp_distribute_update_all_wrapper(struct access_list *alist);
-extern void eigrp_distribute_timer_process(struct thread *thread);
-extern void eigrp_distribute_timer_interface(struct thread *thread);
+extern void eigrp_distribute_timer_process(struct event *thread);
+extern void eigrp_distribute_timer_interface(struct event *thread);
#endif /* EIGRPD_EIGRP_FILTER_H_ */
diff --git a/eigrpd/eigrp_hello.c b/eigrpd/eigrp_hello.c
index 55f0a3269..c6d3b879d 100644
--- a/eigrpd/eigrp_hello.c
+++ b/eigrpd/eigrp_hello.c
@@ -66,7 +66,7 @@ static const struct message eigrp_general_tlv_type_str[] = {
* Sends hello packet via multicast for all interfaces eigrp
* is configured for
*/
-void eigrp_hello_timer(struct thread *thread)
+void eigrp_hello_timer(struct event *thread)
{
struct eigrp_interface *ei;
diff --git a/eigrpd/eigrp_neighbor.c b/eigrpd/eigrp_neighbor.c
index f427067b3..582428ed1 100644
--- a/eigrpd/eigrp_neighbor.c
+++ b/eigrpd/eigrp_neighbor.c
@@ -174,7 +174,7 @@ void eigrp_nbr_delete(struct eigrp_neighbor *nbr)
XFREE(MTYPE_EIGRP_NEIGHBOR, nbr);
}
-void holddown_timer_expired(struct thread *thread)
+void holddown_timer_expired(struct event *thread)
{
struct eigrp_neighbor *nbr = THREAD_ARG(thread);
struct eigrp *eigrp = nbr->ei->eigrp;
diff --git a/eigrpd/eigrp_neighbor.h b/eigrpd/eigrp_neighbor.h
index 5c9e44e2b..2ccc89cf3 100644
--- a/eigrpd/eigrp_neighbor.h
+++ b/eigrpd/eigrp_neighbor.h
@@ -24,7 +24,7 @@ extern struct eigrp_neighbor *eigrp_nbr_get(struct eigrp_interface *ei,
extern struct eigrp_neighbor *eigrp_nbr_new(struct eigrp_interface *ei);
extern void eigrp_nbr_delete(struct eigrp_neighbor *neigh);
-extern void holddown_timer_expired(struct thread *thread);
+extern void holddown_timer_expired(struct event *thread);
extern int eigrp_neighborship_check(struct eigrp_neighbor *neigh,
struct TLV_Parameter_Type *tlv);
diff --git a/eigrpd/eigrp_network.h b/eigrpd/eigrp_network.h
index 33d91c2fb..ac5c47f6f 100644
--- a/eigrpd/eigrp_network.h
+++ b/eigrpd/eigrp_network.h
@@ -20,7 +20,7 @@ extern int eigrp_if_ipmulticast(struct eigrp *, struct prefix *, unsigned int);
extern int eigrp_network_set(struct eigrp *eigrp, struct prefix *p);
extern int eigrp_network_unset(struct eigrp *eigrp, struct prefix *p);
-extern void eigrp_hello_timer(struct thread *thread);
+extern void eigrp_hello_timer(struct event *thread);
extern void eigrp_if_update(struct interface *);
extern int eigrp_if_add_allspfrouters(struct eigrp *, struct prefix *,
unsigned int);
diff --git a/eigrpd/eigrp_packet.c b/eigrpd/eigrp_packet.c
index 02fb3d23b..24603fa74 100644
--- a/eigrpd/eigrp_packet.c
+++ b/eigrpd/eigrp_packet.c
@@ -305,7 +305,7 @@ int eigrp_check_sha256_digest(struct stream *s,
return 1;
}
-void eigrp_write(struct thread *thread)
+void eigrp_write(struct event *thread)
{
struct eigrp *eigrp = THREAD_ARG(thread);
struct eigrp_header *eigrph;
@@ -459,7 +459,7 @@ out:
}
/* Starting point of packet process function. */
-void eigrp_read(struct thread *thread)
+void eigrp_read(struct event *thread)
{
int ret;
struct stream *ibuf;
@@ -970,7 +970,7 @@ static int eigrp_check_network_mask(struct eigrp_interface *ei,
return 0;
}
-void eigrp_unack_packet_retrans(struct thread *thread)
+void eigrp_unack_packet_retrans(struct event *thread)
{
struct eigrp_neighbor *nbr;
nbr = (struct eigrp_neighbor *)THREAD_ARG(thread);
@@ -1006,7 +1006,7 @@ void eigrp_unack_packet_retrans(struct thread *thread)
}
}
-void eigrp_unack_multicast_packet_retrans(struct thread *thread)
+void eigrp_unack_multicast_packet_retrans(struct event *thread)
{
struct eigrp_neighbor *nbr;
nbr = (struct eigrp_neighbor *)THREAD_ARG(thread);
diff --git a/eigrpd/eigrp_packet.h b/eigrpd/eigrp_packet.h
index 4c1cfd482..6a0360ed8 100644
--- a/eigrpd/eigrp_packet.h
+++ b/eigrpd/eigrp_packet.h
@@ -18,8 +18,8 @@
#define _ZEBRA_EIGRP_PACKET_H
/*Prototypes*/
-extern void eigrp_read(struct thread *thread);
-extern void eigrp_write(struct thread *thread);
+extern void eigrp_read(struct event *thread);
+extern void eigrp_write(struct event *thread);
extern struct eigrp_packet *eigrp_packet_new(size_t size,
struct eigrp_neighbor *nbr);
@@ -51,8 +51,8 @@ extern uint16_t eigrp_add_authTLV_MD5_to_stream(struct stream *s,
extern uint16_t eigrp_add_authTLV_SHA256_to_stream(struct stream *s,
struct eigrp_interface *ei);
-extern void eigrp_unack_packet_retrans(struct thread *thread);
-extern void eigrp_unack_multicast_packet_retrans(struct thread *thread);
+extern void eigrp_unack_packet_retrans(struct event *thread);
+extern void eigrp_unack_multicast_packet_retrans(struct event *thread);
/*
* untill there is reason to have their own header, these externs are found in
@@ -65,7 +65,7 @@ extern void eigrp_hello_send_ack(struct eigrp_neighbor *nbr);
extern void eigrp_hello_receive(struct eigrp *eigrp, struct ip *iph,
struct eigrp_header *eigrph, struct stream *s,
struct eigrp_interface *ei, int size);
-extern void eigrp_hello_timer(struct thread *thread);
+extern void eigrp_hello_timer(struct event *thread);
/*
* These externs are found in eigrp_update.c
@@ -81,7 +81,7 @@ extern void eigrp_update_send_all(struct eigrp *eigrp,
struct eigrp_interface *exception);
extern void eigrp_update_send_init(struct eigrp_neighbor *nbr);
extern void eigrp_update_send_EOT(struct eigrp_neighbor *nbr);
-extern void eigrp_update_send_GR_thread(struct thread *thread);
+extern void eigrp_update_send_GR_thread(struct event *thread);
extern void eigrp_update_send_GR(struct eigrp_neighbor *nbr,
enum GR_type gr_type, struct vty *vty);
extern void eigrp_update_send_interface_GR(struct eigrp_interface *ei,
diff --git a/eigrpd/eigrp_structs.h b/eigrpd/eigrp_structs.h
index 9c88e34f6..8735c4866 100644
--- a/eigrpd/eigrp_structs.h
+++ b/eigrpd/eigrp_structs.h
@@ -71,9 +71,9 @@ struct eigrp {
struct list *oi_write_q;
/*Threads*/
- struct thread *t_write;
- struct thread *t_read;
- struct thread *t_distribute; /* timer for distribute list */
+ struct event *t_write;
+ struct event *t_read;
+ struct event *t_distribute; /* timer for distribute list */
struct route_table *networks; /* EIGRP config networks. */
@@ -165,8 +165,8 @@ struct eigrp_interface {
struct list *nbrs; /* EIGRP Neighbor List */
/* Threads. */
- struct thread *t_hello; /* timer */
- struct thread *t_distribute; /* timer for distribute list */
+ struct event *t_hello; /* timer */
+ struct event *t_distribute; /* timer for distribute list */
int on_write_q;
@@ -240,8 +240,8 @@ struct eigrp_neighbor {
uint16_t v_holddown;
/* Threads. */
- struct thread *t_holddown;
- struct thread *t_nbr_send_gr; /* thread for sending multiple GR packet
+ struct event *t_holddown;
+ struct event *t_nbr_send_gr; /* thread for sending multiple GR packet
chunks */
struct eigrp_fifo *retrans_queue;
@@ -271,7 +271,7 @@ struct eigrp_packet {
struct in_addr dst;
/*Packet retransmission thread*/
- struct thread *t_retrans_timer;
+ struct event *t_retrans_timer;
/*Packet retransmission counter*/
uint8_t retrans_counter;
diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c
index 6d4b3eb8e..ccc0c9a4b 100644
--- a/eigrpd/eigrp_update.c
+++ b/eigrpd/eigrp_update.c
@@ -895,7 +895,7 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
*
* Uses nbr_gr_packet_type and t_nbr_send_gr from neighbor.
*/
-void eigrp_update_send_GR_thread(struct thread *thread)
+void eigrp_update_send_GR_thread(struct event *thread)
{
struct eigrp_neighbor *nbr;
diff --git a/isisd/fabricd.c b/isisd/fabricd.c
index 64734f862..40cc15881 100644
--- a/isisd/fabricd.c
+++ b/isisd/fabricd.c
@@ -40,7 +40,7 @@ struct fabricd {
enum fabricd_sync_state initial_sync_state;
time_t initial_sync_start;
struct isis_circuit *initial_sync_circuit;
- struct thread *initial_sync_timeout;
+ struct event *initial_sync_timeout;
struct isis_spftree *spftree;
struct skiplist *neighbors;
@@ -49,8 +49,8 @@ struct fabricd {
uint8_t tier;
uint8_t tier_config;
uint8_t tier_pending;
- struct thread *tier_calculation_timer;
- struct thread *tier_set_timer;
+ struct event *tier_calculation_timer;
+ struct event *tier_set_timer;
int csnp_delay;
bool always_send_csnp;
@@ -237,7 +237,7 @@ void fabricd_finish(struct fabricd *f)
hash_free(f->neighbors_neighbors);
}
-static void fabricd_initial_sync_timeout(struct thread *thread)
+static void fabricd_initial_sync_timeout(struct event *thread)
{
struct fabricd *f = THREAD_ARG(thread);
@@ -389,14 +389,14 @@ static uint8_t fabricd_calculate_fabric_tier(struct isis_area *area)
return tier;
}
-static void fabricd_tier_set_timer(struct thread *thread)
+static void fabricd_tier_set_timer(struct event *thread)
{
struct fabricd *f = THREAD_ARG(thread);
fabricd_set_tier(f, f->tier_pending);
}
-static void fabricd_tier_calculation_cb(struct thread *thread)
+static void fabricd_tier_calculation_cb(struct event *thread)
{
struct fabricd *f = THREAD_ARG(thread);
uint8_t tier = ISIS_TIER_UNDEFINED;
diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c
index 16def982b..3eb4e0e8f 100644
--- a/isisd/isis_adjacency.c
+++ b/isisd/isis_adjacency.c
@@ -478,7 +478,7 @@ const char *isis_adj_yang_state(enum isis_adj_state state)
assert(!"Reached end of function where we are not expecting to");
}
-void isis_adj_expire(struct thread *thread)
+void isis_adj_expire(struct event *thread)
{
struct isis_adjacency *adj;
diff --git a/isisd/isis_adjacency.h b/isisd/isis_adjacency.h
index c260ce78d..f02f7a68e 100644
--- a/isisd/isis_adjacency.h
+++ b/isisd/isis_adjacency.h
@@ -90,7 +90,7 @@ struct isis_adjacency {
enum isis_threeway_state threeway_state;
uint32_t ext_circuit_id;
int flaps; /* number of adjacency flaps */
- struct thread *t_expire; /* expire after hold_time */
+ struct event *t_expire; /* expire after hold_time */
struct isis_circuit *circuit; /* back pointer */
uint16_t *mt_set; /* Topologies this adjacency is valid for */
unsigned int mt_count; /* Number of entries in mt_set */
@@ -128,7 +128,7 @@ void isis_adj_state_change(struct isis_adjacency **adj,
enum isis_adj_state state, const char *reason);
void isis_adj_print(struct isis_adjacency *adj);
const char *isis_adj_yang_state(enum isis_adj_state state);
-void isis_adj_expire(struct thread *thread);
+void isis_adj_expire(struct event *thread);
void isis_adj_print_vty(struct isis_adjacency *adj, struct vty *vty,
char detail);
void isis_adj_print_json(struct isis_adjacency *adj, struct json_object *json,
@@ -136,6 +136,6 @@ void isis_adj_print_json(struct isis_adjacency *adj, struct json_object *json,
void isis_adj_build_neigh_list(struct list *adjdb, struct list *list);
void isis_adj_build_up_list(struct list *adjdb, struct list *list);
int isis_adj_usage2levels(enum isis_adj_usage usage);
-void isis_bfd_startup_timer(struct thread *thread);
+void isis_bfd_startup_timer(struct event *thread);
const char *isis_adj_name(const struct isis_adjacency *adj);
#endif /* ISIS_ADJACENCY_H */
diff --git a/isisd/isis_circuit.h b/isisd/isis_circuit.h
index df977893e..7acde419f 100644
--- a/isisd/isis_circuit.h
+++ b/isisd/isis_circuit.h
@@ -41,21 +41,21 @@ struct metric {
struct isis_bcast_info {
uint8_t snpa[ETH_ALEN]; /* SNPA of this circuit */
char run_dr_elect[ISIS_LEVELS]; /* Should we run dr election ? */
- struct thread *t_run_dr[ISIS_LEVELS]; /* DR election thread */
- struct thread *t_send_lan_hello[ISIS_LEVELS]; /* send LAN IIHs in this
- thread */
+ struct event *t_run_dr[ISIS_LEVELS]; /* DR election thread */
+ struct event *t_send_lan_hello[ISIS_LEVELS]; /* send LAN IIHs in this
+ thread */
struct list *adjdb[ISIS_LEVELS]; /* adjacency dbs */
struct list *lan_neighs[ISIS_LEVELS]; /* list of lx neigh snpa */
char is_dr[ISIS_LEVELS]; /* Are we level x DR ? */
uint8_t l1_desig_is[ISIS_SYS_ID_LEN + 1]; /* level-1 DR */
uint8_t l2_desig_is[ISIS_SYS_ID_LEN + 1]; /* level-2 DR */
- struct thread *t_refresh_pseudo_lsp[ISIS_LEVELS]; /* refresh pseudo-node
+ struct event *t_refresh_pseudo_lsp[ISIS_LEVELS]; /* refresh pseudo-node
LSPs */
};
struct isis_p2p_info {
struct isis_adjacency *neighbor;
- struct thread *t_send_p2p_hello; /* send P2P IIHs in this thread */
+ struct event *t_send_p2p_hello; /* send P2P IIHs in this thread */
};
struct isis_circuit_arg {
@@ -85,9 +85,9 @@ struct isis_circuit {
/*
* Threads
*/
- struct thread *t_read;
- struct thread *t_send_csnp[ISIS_LEVELS];
- struct thread *t_send_psnp[ISIS_LEVELS];
+ struct event *t_read;
+ struct event *t_send_csnp[ISIS_LEVELS];
+ struct event *t_send_psnp[ISIS_LEVELS];
struct isis_tx_queue *tx_queue;
struct isis_circuit_arg
level_arg[ISIS_LEVELS]; /* used as argument for threads */
diff --git a/isisd/isis_dr.c b/isisd/isis_dr.c
index 5b236a66d..8949318cc 100644
--- a/isisd/isis_dr.c
+++ b/isisd/isis_dr.c
@@ -48,7 +48,7 @@ const char *isis_disflag2string(int disflag)
return NULL; /* not reached */
}
-void isis_run_dr(struct thread *thread)
+void isis_run_dr(struct event *thread)
{
struct isis_circuit_arg *arg = THREAD_ARG(thread);
diff --git a/isisd/isis_dr.h b/isisd/isis_dr.h
index 2b9bf60ff..135916a4c 100644
--- a/isisd/isis_dr.h
+++ b/isisd/isis_dr.h
@@ -11,7 +11,7 @@
#ifndef _ZEBRA_ISIS_DR_H
#define _ZEBRA_ISIS_DR_H
-void isis_run_dr(struct thread *thread);
+void isis_run_dr(struct event *thread);
int isis_dr_elect(struct isis_circuit *circuit, int level);
int isis_dr_resign(struct isis_circuit *circuit, int level);
int isis_dr_commence(struct isis_circuit *circuit, int level);
diff --git a/isisd/isis_dynhn.c b/isisd/isis_dynhn.c
index 667a90c2c..78197561b 100644
--- a/isisd/isis_dynhn.c
+++ b/isisd/isis_dynhn.c
@@ -29,7 +29,7 @@
DEFINE_MTYPE_STATIC(ISISD, ISIS_DYNHN, "ISIS dyn hostname");
-static void dyn_cache_cleanup(struct thread *);
+static void dyn_cache_cleanup(struct event *);
void dyn_cache_init(struct isis *isis)
{
@@ -54,7 +54,7 @@ void dyn_cache_finish(struct isis *isis)
list_delete(&isis->dyn_cache);
}
-static void dyn_cache_cleanup(struct thread *thread)
+static void dyn_cache_cleanup(struct event *thread)
{
struct listnode *node, *nnode;
struct isis_dynhn *dyn;
diff --git a/isisd/isis_events.c b/isisd/isis_events.c
index 87b6061b5..9baf58650 100644
--- a/isisd/isis_events.c
+++ b/isisd/isis_events.c
@@ -196,7 +196,7 @@ void isis_circuit_is_type_set(struct isis_circuit *circuit, int newtype)
/* events supporting code */
-void isis_event_dis_status_change(struct thread *thread)
+void isis_event_dis_status_change(struct event *thread)
{
struct isis_circuit *circuit;
diff --git a/isisd/isis_events.h b/isisd/isis_events.h
index e827f75a8..a0ac964fa 100644
--- a/isisd/isis_events.h
+++ b/isisd/isis_events.h
@@ -18,7 +18,7 @@ void isis_event_circuit_type_change(struct isis_circuit *circuit, int newtype);
/*
* Events related to adjacencies
*/
-void isis_event_dis_status_change(struct thread *thread);
+void isis_event_dis_status_change(struct event *thread);
/*
* Error events
diff --git a/isisd/isis_ldp_sync.c b/isisd/isis_ldp_sync.c
index 497906aae..7ba04a1c1 100644
--- a/isisd/isis_ldp_sync.c
+++ b/isisd/isis_ldp_sync.c
@@ -331,7 +331,7 @@ void isis_ldp_sync_set_if_metric(struct isis_circuit *circuit, bool run_regen)
/*
* LDP-SYNC holddown timer routines
*/
-static void isis_ldp_sync_holddown_timer(struct thread *thread)
+static void isis_ldp_sync_holddown_timer(struct event *thread)
{
struct isis_circuit *circuit;
struct ldp_sync_info *ldp_sync_info;
diff --git a/isisd/isis_lfa.c b/isisd/isis_lfa.c
index 599dca129..4d2d54568 100644
--- a/isisd/isis_lfa.c
+++ b/isisd/isis_lfa.c
@@ -1388,7 +1388,7 @@ static struct rlfa *rlfa_lookup(struct isis_spftree *spftree,
return rlfa_tree_find(&spftree->lfa.remote.rlfas, &s);
}
-static void isis_area_verify_routes_cb(struct thread *thread)
+static void isis_area_verify_routes_cb(struct event *thread)
{
struct isis_area *area = THREAD_ARG(thread);
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index 59cedec70..1498bbc0e 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -49,9 +49,9 @@
DEFINE_MTYPE_STATIC(ISISD, ISIS_LSP, "ISIS LSP");
-static void lsp_refresh(struct thread *thread);
-static void lsp_l1_refresh_pseudo(struct thread *thread);
-static void lsp_l2_refresh_pseudo(struct thread *thread);
+static void lsp_refresh(struct event *thread);
+static void lsp_l1_refresh_pseudo(struct event *thread);
+static void lsp_l2_refresh_pseudo(struct event *thread);
static void lsp_destroy(struct isis_lsp *lsp);
@@ -429,7 +429,7 @@ bool isis_level2_adj_up(struct isis_area *area)
/*
* Unset the overload bit after the timer expires
*/
-void set_overload_on_start_timer(struct thread *thread)
+void set_overload_on_start_timer(struct event *thread)
{
struct isis_area *area = THREAD_ARG(thread);
assert(area);
@@ -1523,7 +1523,7 @@ static int lsp_regenerate(struct isis_area *area, int level)
/*
* Something has changed or periodic refresh -> regenerate LSP
*/
-static void lsp_refresh(struct thread *thread)
+static void lsp_refresh(struct event *thread)
{
struct lsp_refresh_arg *arg = THREAD_ARG(thread);
@@ -1903,7 +1903,7 @@ static int lsp_regenerate_pseudo(struct isis_circuit *circuit, int level)
/*
* Something has changed or periodic refresh -> regenerate pseudo LSP
*/
-static void lsp_l1_refresh_pseudo(struct thread *thread)
+static void lsp_l1_refresh_pseudo(struct event *thread)
{
struct isis_circuit *circuit;
uint8_t id[ISIS_SYS_ID_LEN + 2];
@@ -1925,7 +1925,7 @@ static void lsp_l1_refresh_pseudo(struct thread *thread)
lsp_regenerate_pseudo(circuit, IS_LEVEL_1);
}
-static void lsp_l2_refresh_pseudo(struct thread *thread)
+static void lsp_l2_refresh_pseudo(struct event *thread)
{
struct isis_circuit *circuit;
uint8_t id[ISIS_SYS_ID_LEN + 2];
@@ -2049,7 +2049,7 @@ int lsp_regenerate_schedule_pseudo(struct isis_circuit *circuit, int level)
* Walk through LSPs for an area
* - set remaining lifetime
*/
-void lsp_tick(struct thread *thread)
+void lsp_tick(struct event *thread)
{
struct isis_area *area;
struct isis_lsp *lsp;
diff --git a/isisd/isis_lsp.h b/isisd/isis_lsp.h
index 5bb2b949c..3839a9504 100644
--- a/isisd/isis_lsp.h
+++ b/isisd/isis_lsp.h
@@ -52,8 +52,8 @@ DECLARE_RBTREE_UNIQ(lspdb, struct isis_lsp, dbe, lspdb_compare);
void lsp_db_init(struct lspdb_head *head);
void lsp_db_fini(struct lspdb_head *head);
-void lsp_tick(struct thread *thread);
-void set_overload_on_start_timer(struct thread *thread);
+void lsp_tick(struct event *thread);
+void set_overload_on_start_timer(struct event *thread);
int lsp_generate(struct isis_area *area, int level);
#define lsp_regenerate_schedule(area, level, all_pseudo) \
diff --git a/isisd/isis_main.c b/isisd/isis_main.c
index 99a18fc31..ad5ec9f89 100644
--- a/isisd/isis_main.c
+++ b/isisd/isis_main.c
@@ -169,7 +169,7 @@ static const struct frr_yang_module_info *const isisd_yang_modules[] = {
/* clang-format on */
-static void isis_config_finish(struct thread *t)
+static void isis_config_finish(struct event *t)
{
struct listnode *node, *inode;
struct isis *isis;
diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c
index ec1b8d268..9965b2273 100644
--- a/isisd/isis_pdu.c
+++ b/isisd/isis_pdu.c
@@ -1780,7 +1780,7 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa)
return retval;
}
-void isis_receive(struct thread *thread)
+void isis_receive(struct event *thread)
{
struct isis_circuit *circuit;
uint8_t ssnpa[ETH_ALEN];
@@ -2009,7 +2009,7 @@ int send_hello(struct isis_circuit *circuit, int level)
return retval;
}
-static void send_hello_cb(struct thread *thread)
+static void send_hello_cb(struct event *thread)
{
struct isis_circuit_arg *arg = THREAD_ARG(thread);
assert(arg);
@@ -2050,8 +2050,7 @@ static void send_hello_cb(struct thread *thread)
}
static void _send_hello_sched(struct isis_circuit *circuit,
- struct thread **threadp,
- int level, long delay)
+ struct event **threadp, int level, long delay)
{
if (*threadp) {
if (thread_timer_remain_msec(*threadp) < (unsigned long)delay)
@@ -2240,7 +2239,7 @@ int send_csnp(struct isis_circuit *circuit, int level)
return ISIS_OK;
}
-void send_l1_csnp(struct thread *thread)
+void send_l1_csnp(struct event *thread)
{
struct isis_circuit *circuit;
@@ -2260,7 +2259,7 @@ void send_l1_csnp(struct thread *thread)
&circuit->t_send_csnp[0]);
}
-void send_l2_csnp(struct thread *thread)
+void send_l2_csnp(struct event *thread)
{
struct isis_circuit *circuit;
@@ -2394,7 +2393,7 @@ static int send_psnp(int level, struct isis_circuit *circuit)
return ISIS_OK;
}
-void send_l1_psnp(struct thread *thread)
+void send_l1_psnp(struct event *thread)
{
struct isis_circuit *circuit;
@@ -2415,7 +2414,7 @@ void send_l1_psnp(struct thread *thread)
* 7.3.15.4 action on expiration of partial SNP interval
* level 2
*/
-void send_l2_psnp(struct thread *thread)
+void send_l2_psnp(struct event *thread)
{
struct isis_circuit *circuit;
diff --git a/isisd/isis_pdu.h b/isisd/isis_pdu.h
index 512439400..ccd89a70f 100644
--- a/isisd/isis_pdu.h
+++ b/isisd/isis_pdu.h
@@ -182,7 +182,7 @@ struct isis_partial_seqnum_hdr {
/*
* Function for receiving IS-IS PDUs
*/
-void isis_receive(struct thread *thread);
+void isis_receive(struct event *thread);
/*
* calling arguments for snp_process ()
@@ -197,10 +197,10 @@ void isis_receive(struct thread *thread);
*/
void send_hello_sched(struct isis_circuit *circuit, int level, long delay);
int send_csnp(struct isis_circuit *circuit, int level);
-void send_l1_csnp(struct thread *thread);
-void send_l2_csnp(struct thread *thread);
-void send_l1_psnp(struct thread *thread);
-void send_l2_psnp(struct thread *thread);
+void send_l1_csnp(struct event *thread);
+void send_l2_csnp(struct event *thread);
+void send_l1_psnp(struct event *thread);
+void send_l2_psnp(struct event *thread);
void send_lsp(struct isis_circuit *circuit,
struct isis_lsp *lsp, enum isis_tx_type tx_type);
void fill_fixed_hdr(uint8_t pdu_type, struct stream *stream);
diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c
index 90f5ff69a..feb2d235b 100644
--- a/isisd/isis_spf.c
+++ b/isisd/isis_spf.c
@@ -1853,7 +1853,7 @@ void isis_spf_switchover_routes(struct isis_area *area,
family, nexthop_ip, ifindex);
}
-static void isis_run_spf_cb(struct thread *thread)
+static void isis_run_spf_cb(struct event *thread)
{
struct isis_spf_run *run = THREAD_ARG(thread);
struct isis_area *area = run->area;
diff --git a/isisd/isis_sr.c b/isisd/isis_sr.c
index 429399165..59209d3ac 100644
--- a/isisd/isis_sr.c
+++ b/isisd/isis_sr.c
@@ -1081,7 +1081,7 @@ DEFUN(show_sr_node, show_sr_node_cmd,
*
* @return 1 on success
*/
-static void sr_start_label_manager(struct thread *start)
+static void sr_start_label_manager(struct event *start)
{
struct isis_area *area;
diff --git a/isisd/isis_sr.h b/isisd/isis_sr.h
index 627f1fb74..4ced5f4e8 100644
--- a/isisd/isis_sr.h
+++ b/isisd/isis_sr.h
@@ -155,7 +155,7 @@ struct isis_sr_db {
bool enabled;
/* Thread timer to start Label Manager */
- struct thread *t_start_lm;
+ struct event *t_start_lm;
/* List of local Adjacency-SIDs. */
struct list *adj_sids;
diff --git a/isisd/isis_tx_queue.c b/isisd/isis_tx_queue.c
index eada0d552..42e1d68e0 100644
--- a/isisd/isis_tx_queue.c
+++ b/isisd/isis_tx_queue.c
@@ -32,7 +32,7 @@ struct isis_tx_queue_entry {
struct isis_lsp *lsp;
enum isis_tx_type type;
bool is_retry;
- struct thread *retry;
+ struct event *retry;
struct isis_tx_queue *queue;
};
@@ -100,7 +100,7 @@ static struct isis_tx_queue_entry *tx_queue_find(struct isis_tx_queue *queue,
return hash_lookup(queue->hash, &e);
}
-static void tx_queue_send_event(struct thread *thread)
+static void tx_queue_send_event(struct event *thread)
{
struct isis_tx_queue_entry *e = THREAD_ARG(thread);
struct isis_tx_queue *queue = e->queue;
diff --git a/isisd/isisd.c b/isisd/isisd.c
index ee402dad9..73049d208 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -88,7 +88,7 @@ static struct isis_master isis_master;
struct isis_master *im;
/* ISIS config processing thread */
-struct thread *t_isis_cfg;
+struct event *t_isis_cfg;
#ifndef FABRICD
DEFINE_HOOK(isis_hook_db_overload, (const struct isis_area *area), (area));
diff --git a/isisd/isisd.h b/isisd/isisd.h
index 37a36fd37..b86759af9 100644
--- a/isisd/isisd.h
+++ b/isisd/isisd.h
@@ -89,7 +89,7 @@ struct isis {
uint8_t max_area_addrs; /* maximumAreaAdresses */
struct area_addr *man_area_addrs; /* manualAreaAddresses */
time_t uptime; /* when did we start */
- struct thread *t_dync_clean; /* dynamic hostname cache cleanup thread */
+ struct event *t_dync_clean; /* dynamic hostname cache cleanup thread */
uint32_t circuit_ids_used[8]; /* 256 bits to track circuit ids 1 through 255 */
int snmp_notifications;
struct list *dyn_cache;
@@ -99,7 +99,7 @@ struct isis {
extern struct isis_master *im;
-extern struct thread *t_isis_cfg;
+extern struct event *t_isis_cfg;
enum spf_tree_id {
SPFTREE_IPV4 = 0,
@@ -129,11 +129,11 @@ struct isis_area {
struct list *circuit_list; /* IS-IS circuits */
struct list *adjacency_list; /* IS-IS adjacencies */
struct flags flags;
- struct thread *t_tick; /* LSP walker */
- struct thread *t_lsp_refresh[ISIS_LEVELS];
- struct thread *t_overload_on_startup_timer;
+ struct event *t_tick; /* LSP walker */
+ struct event *t_lsp_refresh[ISIS_LEVELS];
+ struct event *t_overload_on_startup_timer;
struct timeval last_lsp_refresh_event[ISIS_LEVELS];
- struct thread *t_rlfa_rib_update;
+ struct event *t_rlfa_rib_update;
/* t_lsp_refresh is used in two ways:
* a) regular refresh of LSPs
* b) (possibly throttled) updates to LSPs
@@ -226,7 +226,7 @@ struct isis_area {
struct spf_backoff *spf_delay_ietf[ISIS_LEVELS]; /*Structure with IETF
SPF algo
parameters*/
- struct thread *spf_timer[ISIS_LEVELS];
+ struct event *spf_timer[ISIS_LEVELS];
struct lsp_refresh_arg lsp_refresh_arg[ISIS_LEVELS];
diff --git a/ldpd/accept.c b/ldpd/accept.c
index 170c079b5..6151c1a0b 100644
--- a/ldpd/accept.c
+++ b/ldpd/accept.c
@@ -13,21 +13,21 @@
struct accept_ev {
LIST_ENTRY(accept_ev) entry;
- struct thread *ev;
- void (*accept_cb)(struct thread *);
+ struct event *ev;
+ void (*accept_cb)(struct event *);
void *arg;
int fd;
};
struct {
LIST_HEAD(, accept_ev) queue;
- struct thread *evt;
+ struct event *evt;
} accept_queue;
static void accept_arm(void);
static void accept_unarm(void);
-static void accept_cb(struct thread *);
-static void accept_timeout(struct thread *);
+static void accept_cb(struct event *);
+static void accept_timeout(struct event *);
void
accept_init(void)
@@ -35,7 +35,7 @@ accept_init(void)
LIST_INIT(&accept_queue.queue);
}
-int accept_add(int fd, void (*cb)(struct thread *), void *arg)
+int accept_add(int fd, void (*cb)(struct event *), void *arg)
{
struct accept_ev *av;
@@ -103,14 +103,14 @@ accept_unarm(void)
THREAD_OFF(av->ev);
}
-static void accept_cb(struct thread *thread)
+static void accept_cb(struct event *thread)
{
struct accept_ev *av = THREAD_ARG(thread);
thread_add_read(master, accept_cb, av, av->fd, &av->ev);
av->accept_cb(thread);
}
-static void accept_timeout(struct thread *thread)
+static void accept_timeout(struct event *thread)
{
accept_queue.evt = NULL;
diff --git a/ldpd/adjacency.c b/ldpd/adjacency.c
index 42c3ef053..36c14a562 100644
--- a/ldpd/adjacency.c
+++ b/ldpd/adjacency.c
@@ -15,12 +15,12 @@
#include "log.h"
static __inline int adj_compare(const struct adj *, const struct adj *);
-static void adj_itimer(struct thread *);
+static void adj_itimer(struct event *);
static __inline int tnbr_compare(const struct tnbr *, const struct tnbr *);
static void tnbr_del(struct ldpd_conf *, struct tnbr *);
static void tnbr_start(struct tnbr *);
static void tnbr_stop(struct tnbr *);
-static void tnbr_hello_timer(struct thread *);
+static void tnbr_hello_timer(struct event *);
static void tnbr_start_hello_timer(struct tnbr *);
static void tnbr_stop_hello_timer(struct tnbr *);
@@ -161,7 +161,7 @@ adj_get_af(const struct adj *adj)
/* adjacency timers */
/* ARGSUSED */
-static void adj_itimer(struct thread *thread)
+static void adj_itimer(struct event *thread)
{
struct adj *adj = THREAD_ARG(thread);
@@ -331,7 +331,7 @@ tnbr_get_hello_interval(struct tnbr *tnbr)
/* target neighbors timers */
/* ARGSUSED */
-static void tnbr_hello_timer(struct thread *thread)
+static void tnbr_hello_timer(struct event *thread)
{
struct tnbr *tnbr = THREAD_ARG(thread);
diff --git a/ldpd/control.c b/ldpd/control.c
index b1260feb6..2313e232f 100644
--- a/ldpd/control.c
+++ b/ldpd/control.c
@@ -15,11 +15,11 @@
#define CONTROL_BACKLOG 5
-static void control_accept(struct thread *);
+static void control_accept(struct event *);
static struct ctl_conn *control_connbyfd(int);
static struct ctl_conn *control_connbypid(pid_t);
static void control_close(int);
-static void control_dispatch_imsg(struct thread *);
+static void control_dispatch_imsg(struct event *);
struct ctl_conns ctl_conns;
@@ -90,7 +90,7 @@ control_cleanup(char *path)
}
/* ARGSUSED */
-static void control_accept(struct thread *thread)
+static void control_accept(struct event *thread)
{
int connfd;
socklen_t len;
@@ -177,7 +177,7 @@ control_close(int fd)
}
/* ARGSUSED */
-static void control_dispatch_imsg(struct thread *thread)
+static void control_dispatch_imsg(struct event *thread)
{
int fd = THREAD_FD(thread);
struct ctl_conn *c;
diff --git a/ldpd/interface.c b/ldpd/interface.c
index 5d1859298..6996bf7c1 100644
--- a/ldpd/interface.c
+++ b/ldpd/interface.c
@@ -22,7 +22,7 @@ static struct if_addr *if_addr_lookup(struct if_addr_head *, struct kaddr *);
static int if_start(struct iface *, int);
static int if_reset(struct iface *, int);
static void if_update_af(struct iface_af *);
-static void if_hello_timer(struct thread *thread);
+static void if_hello_timer(struct event *thread);
static void if_start_hello_timer(struct iface_af *);
static void if_stop_hello_timer(struct iface_af *);
static int if_join_ipv4_group(struct iface *, struct in_addr *);
@@ -32,7 +32,7 @@ static int if_leave_ipv6_group(struct iface *, struct in6_addr *);
static int ldp_sync_fsm_init(struct iface *iface, int state);
static int ldp_sync_act_iface_start_sync(struct iface *iface);
-static void iface_wait_for_ldp_sync_timer(struct thread *thread);
+static void iface_wait_for_ldp_sync_timer(struct event *thread);
static void start_wait_for_ldp_sync_timer(struct iface *iface);
static void stop_wait_for_ldp_sync_timer(struct iface *iface);
static int ldp_sync_act_ldp_start_sync(struct iface *iface);
@@ -444,7 +444,7 @@ if_get_wait_for_sync_interval(void)
/* timers */
/* ARGSUSED */
-static void if_hello_timer(struct thread *thread)
+static void if_hello_timer(struct event *thread)
{
struct iface_af *ia = THREAD_ARG(thread);
@@ -720,7 +720,7 @@ ldp_sync_act_iface_start_sync(struct iface *iface)
return (0);
}
-static void iface_wait_for_ldp_sync_timer(struct thread *thread)
+static void iface_wait_for_ldp_sync_timer(struct event *thread)
{
struct iface *iface = THREAD_ARG(thread);
diff --git a/ldpd/lde.c b/ldpd/lde.c
index 325b33d05..3a38e165c 100644
--- a/ldpd/lde.c
+++ b/ldpd/lde.c
@@ -30,8 +30,8 @@
#include "libfrr.h"
static void lde_shutdown(void);
-static void lde_dispatch_imsg(struct thread *thread);
-static void lde_dispatch_parent(struct thread *thread);
+static void lde_dispatch_imsg(struct event *thread);
+static void lde_dispatch_parent(struct event *thread);
static __inline int lde_nbr_compare(const struct lde_nbr *,
const struct lde_nbr *);
static struct lde_nbr *lde_nbr_new(uint32_t, struct lde_nbr *);
@@ -145,7 +145,7 @@ lde(void)
/* create base configuration */
ldeconf = config_new_empty();
- struct thread thread;
+ struct event thread;
while (thread_fetch(master, &thread))
thread_call(&thread);
@@ -232,7 +232,7 @@ lde_imsg_compose_ldpe(int type, uint32_t peerid, pid_t pid, void *data,
}
/* ARGSUSED */
-static void lde_dispatch_imsg(struct thread *thread)
+static void lde_dispatch_imsg(struct event *thread)
{
struct imsgev *iev = THREAD_ARG(thread);
struct imsgbuf *ibuf = &iev->ibuf;
@@ -402,7 +402,7 @@ static void lde_dispatch_imsg(struct thread *thread)
}
/* ARGSUSED */
-static void lde_dispatch_parent(struct thread *thread)
+static void lde_dispatch_parent(struct event *thread)
{
static struct ldpd_conf *nconf;
struct iface *iface, *niface;
@@ -2123,7 +2123,7 @@ lde_address_list_free(struct lde_nbr *ln)
/*
* Event callback used to retry the label-manager sync zapi session.
*/
-static void zclient_sync_retry(struct thread *thread)
+static void zclient_sync_retry(struct event *thread)
{
zclient_sync_init();
}
diff --git a/ldpd/lde.h b/ldpd/lde.h
index 3a64f0d3b..2688b6a86 100644
--- a/ldpd/lde.h
+++ b/ldpd/lde.h
@@ -132,7 +132,7 @@ struct label_chunk {
extern struct ldpd_conf *ldeconf;
extern struct fec_tree ft;
extern struct nbr_tree lde_nbrs;
-extern struct thread *gc_timer;
+extern struct event *gc_timer;
/* lde.c */
void lde(void);
@@ -216,7 +216,7 @@ void lde_check_withdraw(struct map *, struct lde_nbr *);
void lde_check_withdraw_wcard(struct map *, struct lde_nbr *);
int lde_wildcard_apply(struct map *, struct fec *,
struct lde_map *);
-void lde_gc_timer(struct thread *thread);
+void lde_gc_timer(struct event *thread);
void lde_gc_start_timer(void);
void lde_gc_stop_timer(void);
diff --git a/ldpd/lde_lib.c b/ldpd/lde_lib.c
index d737e9f41..62d06dfb1 100644
--- a/ldpd/lde_lib.c
+++ b/ldpd/lde_lib.c
@@ -28,7 +28,7 @@ static void fec_nh_del(struct fec_nh *);
RB_GENERATE(fec_tree, fec, entry, fec_compare)
struct fec_tree ft = RB_INITIALIZER(&ft);
-struct thread *gc_timer;
+struct event *gc_timer;
/* FEC tree functions */
void
@@ -1026,7 +1026,7 @@ lde_wildcard_apply(struct map *wcard, struct fec *fec, struct lde_map *me)
/* gabage collector timer: timer to remove dead entries from the LIB */
/* ARGSUSED */
-void lde_gc_timer(struct thread *thread)
+void lde_gc_timer(struct event *thread)
{
struct fec *fec, *safe;
struct fec_node *fn;
diff --git a/ldpd/ldpd.c b/ldpd/ldpd.c
index 2026a7857..f549b34ee 100644
--- a/ldpd/ldpd.c
+++ b/ldpd/ldpd.c
@@ -35,8 +35,8 @@
static void ldpd_shutdown(void);
static pid_t start_child(enum ldpd_process, char *, int, int);
-static void main_dispatch_ldpe(struct thread *thread);
-static void main_dispatch_lde(struct thread *thread);
+static void main_dispatch_ldpe(struct event *thread);
+static void main_dispatch_lde(struct event *thread);
static int main_imsg_send_ipc_sockets(struct imsgbuf *,
struct imsgbuf *);
static void main_imsg_send_net_sockets(int);
@@ -208,7 +208,7 @@ FRR_DAEMON_INFO(ldpd, LDP,
.n_yang_modules = array_size(ldpd_yang_modules),
);
-static void ldp_config_fork_apply(struct thread *t)
+static void ldp_config_fork_apply(struct event *t)
{
/*
* So the frr_config_fork() function schedules
@@ -557,7 +557,7 @@ start_child(enum ldpd_process p, char *argv0, int fd_async, int fd_sync)
/* imsg handling */
/* ARGSUSED */
-static void main_dispatch_ldpe(struct thread *thread)
+static void main_dispatch_ldpe(struct event *thread)
{
struct imsgev *iev = THREAD_ARG(thread);
struct imsgbuf *ibuf = &iev->ibuf;
@@ -625,7 +625,7 @@ static void main_dispatch_ldpe(struct thread *thread)
}
/* ARGSUSED */
-static void main_dispatch_lde(struct thread *thread)
+static void main_dispatch_lde(struct event *thread)
{
struct imsgev *iev = THREAD_ARG(thread);
struct imsgbuf *ibuf = &iev->ibuf;
@@ -733,7 +733,7 @@ static void main_dispatch_lde(struct thread *thread)
}
/* ARGSUSED */
-void ldp_write_handler(struct thread *thread)
+void ldp_write_handler(struct event *thread)
{
struct imsgev *iev = THREAD_ARG(thread);
struct imsgbuf *ibuf = &iev->ibuf;
@@ -823,7 +823,7 @@ evbuf_event_add(struct evbuf *eb)
&eb->ev);
}
-void evbuf_init(struct evbuf *eb, int fd, void (*handler)(struct thread *),
+void evbuf_init(struct evbuf *eb, int fd, void (*handler)(struct event *),
void *arg)
{
msgbuf_init(&eb->wbuf);
diff --git a/ldpd/ldpd.h b/ldpd/ldpd.h
index cbf916553..4f20989c0 100644
--- a/ldpd/ldpd.h
+++ b/ldpd/ldpd.h
@@ -51,17 +51,17 @@
struct evbuf {
struct msgbuf wbuf;
- struct thread *ev;
- void (*handler)(struct thread *);
+ struct event *ev;
+ void (*handler)(struct event *);
void *arg;
};
struct imsgev {
struct imsgbuf ibuf;
- void (*handler_write)(struct thread *);
- struct thread *ev_write;
- void (*handler_read)(struct thread *);
- struct thread *ev_read;
+ void (*handler_write)(struct event *);
+ struct event *ev_write;
+ void (*handler_read)(struct event *);
+ struct event *ev_read;
};
enum imsg_type {
@@ -329,14 +329,14 @@ struct iface_af {
int state;
struct ia_adj_head adj_tree;
time_t uptime;
- struct thread *hello_timer;
+ struct event *hello_timer;
uint16_t hello_holdtime;
uint16_t hello_interval;
};
struct iface_ldp_sync {
int state;
- struct thread *wait_for_sync_timer;
+ struct event *wait_for_sync_timer;
};
struct iface {
@@ -359,7 +359,7 @@ DECLARE_QOBJ_TYPE(iface);
/* source of targeted hellos */
struct tnbr {
RB_ENTRY(tnbr) entry;
- struct thread *hello_timer;
+ struct event *hello_timer;
struct adj *adj;
int af;
union ldpd_addr addr;
@@ -582,8 +582,8 @@ DECLARE_QOBJ_TYPE(ldpd_conf);
#define F_LDPD_ALLOW_BROKEN_LSP 0x0010
struct ldpd_af_global {
- struct thread *disc_ev;
- struct thread *edisc_ev;
+ struct event *disc_ev;
+ struct event *edisc_ev;
int ldp_disc_socket;
int ldp_edisc_socket;
int ldp_session_socket;
@@ -781,7 +781,7 @@ void sa2addr(struct sockaddr *, int *, union ldpd_addr *,
socklen_t sockaddr_len(struct sockaddr *);
/* ldpd.c */
-void ldp_write_handler(struct thread *thread);
+void ldp_write_handler(struct event *thread);
void main_imsg_compose_ldpe(int, pid_t, void *, uint16_t);
void main_imsg_compose_lde(int, pid_t, void *, uint16_t);
int main_imsg_compose_both(enum imsg_type, void *,
@@ -791,7 +791,7 @@ int imsg_compose_event(struct imsgev *, uint16_t, uint32_t,
pid_t, int, void *, uint16_t);
void evbuf_enqueue(struct evbuf *, struct ibuf *);
void evbuf_event_add(struct evbuf *);
-void evbuf_init(struct evbuf *, int, void (*)(struct thread *), void *);
+void evbuf_init(struct evbuf *, int, void (*)(struct event *), void *);
void evbuf_clear(struct evbuf *);
int ldp_acl_request(struct imsgev *, char *, int,
union ldpd_addr *, uint8_t);
diff --git a/ldpd/ldpe.c b/ldpd/ldpe.c
index f53dc7254..61a1a2aa8 100644
--- a/ldpd/ldpe.c
+++ b/ldpd/ldpe.c
@@ -25,10 +25,10 @@
#include "libfrr.h"
static void ldpe_shutdown(void);
-static void ldpe_dispatch_main(struct thread *thread);
-static void ldpe_dispatch_lde(struct thread *thread);
+static void ldpe_dispatch_main(struct event *thread);
+static void ldpe_dispatch_lde(struct event *thread);
#ifdef __OpenBSD__
-static void ldpe_dispatch_pfkey(struct thread *thread);
+static void ldpe_dispatch_pfkey(struct event *thread);
#endif
static void ldpe_setup_sockets(int, int, int, int);
static void ldpe_close_sockets(int);
@@ -44,7 +44,7 @@ static struct imsgev iev_main_data;
static struct imsgev *iev_main, *iev_main_sync;
static struct imsgev *iev_lde;
#ifdef __OpenBSD__
-static struct thread *pfkey_ev;
+static struct event *pfkey_ev;
#endif
/* ldpe privileges */
@@ -122,7 +122,7 @@ ldpe(void)
/* create base configuration */
leconf = config_new_empty();
- struct thread thread;
+ struct event thread;
while (thread_fetch(master, &thread))
thread_call(&thread);
@@ -262,7 +262,7 @@ ldpe_imsg_compose_lde(int type, uint32_t peerid, pid_t pid, void *data,
}
/* ARGSUSED */
-static void ldpe_dispatch_main(struct thread *thread)
+static void ldpe_dispatch_main(struct event *thread)
{
static struct ldpd_conf *nconf;
struct iface *niface;
@@ -622,7 +622,7 @@ static void ldpe_dispatch_main(struct thread *thread)
}
/* ARGSUSED */
-static void ldpe_dispatch_lde(struct thread *thread)
+static void ldpe_dispatch_lde(struct event *thread)
{
struct imsgev *iev = THREAD_ARG(thread);
struct imsgbuf *ibuf = &iev->ibuf;
@@ -759,7 +759,7 @@ static void ldpe_dispatch_lde(struct thread *thread)
#ifdef __OpenBSD__
/* ARGSUSED */
-static void ldpe_dispatch_pfkey(struct thread *thread)
+static void ldpe_dispatch_pfkey(struct event *thread)
{
int fd = THREAD_FD(thread);
diff --git a/ldpd/ldpe.h b/ldpd/ldpe.h
index e799538b6..f310ba5dd 100644
--- a/ldpd/ldpe.h
+++ b/ldpd/ldpe.h
@@ -37,7 +37,7 @@ struct adj {
struct nbr *nbr;
int ds_tlv;
struct hello_source source;
- struct thread *inactivity_timer;
+ struct event *inactivity_timer;
uint16_t holdtime;
union ldpd_addr trans_addr;
};
@@ -50,7 +50,7 @@ struct tcp_conn {
int fd;
struct ibuf_read *rbuf;
struct evbuf wbuf;
- struct thread *rev;
+ struct event *rev;
in_port_t lport;
in_port_t rport;
};
@@ -59,11 +59,11 @@ struct nbr {
RB_ENTRY(nbr) id_tree, addr_tree, pid_tree;
struct tcp_conn *tcp;
struct nbr_adj_head adj_tree; /* adjacencies */
- struct thread *ev_connect;
- struct thread *keepalive_timer;
- struct thread *keepalive_timeout;
- struct thread *init_timeout;
- struct thread *initdelay_timer;
+ struct event *ev_connect;
+ struct event *keepalive_timer;
+ struct event *keepalive_timeout;
+ struct event *init_timeout;
+ struct event *initdelay_timer;
struct mapping_head mapping_list;
struct mapping_head withdraw_list;
@@ -115,7 +115,7 @@ struct pending_conn {
int fd;
int af;
union ldpd_addr addr;
- struct thread *ev_timeout;
+ struct event *ev_timeout;
};
#define PENDING_CONN_TIMEOUT 5
@@ -137,7 +137,7 @@ extern struct nbr_pid_head nbrs_by_pid;
/* accept.c */
void accept_init(void);
-int accept_add(int, void (*)(struct thread *), void *);
+int accept_add(int, void (*)(struct event *), void *);
void accept_del(int);
void accept_pause(void);
void accept_unpause(void);
@@ -281,8 +281,8 @@ int gen_ldp_hdr(struct ibuf *, uint16_t);
int gen_msg_hdr(struct ibuf *, uint16_t, uint16_t);
int send_packet(int, int, union ldpd_addr *,
struct iface_af *, void *, size_t);
-void disc_recv_packet(struct thread *thread);
-void session_accept(struct thread *thread);
+void disc_recv_packet(struct event *thread);
+void session_accept(struct event *thread);
void session_accept_nbr(struct nbr *, int);
void session_shutdown(struct nbr *, uint32_t, uint32_t,
uint32_t);
diff --git a/ldpd/neighbor.c b/ldpd/neighbor.c
index 831f2a6ab..e1c9e6337 100644
--- a/ldpd/neighbor.c
+++ b/ldpd/neighbor.c
@@ -24,13 +24,13 @@ static __inline int nbr_addr_compare(const struct nbr *,
static __inline int nbr_pid_compare(const struct nbr *,
const struct nbr *);
static void nbr_update_peerid(struct nbr *);
-static void nbr_ktimer(struct thread *thread);
+static void nbr_ktimer(struct event *thread);
static void nbr_start_ktimer(struct nbr *);
-static void nbr_ktimeout(struct thread *thread);
+static void nbr_ktimeout(struct event *thread);
static void nbr_start_ktimeout(struct nbr *);
-static void nbr_itimeout(struct thread *thread);
+static void nbr_itimeout(struct event *thread);
static void nbr_start_itimeout(struct nbr *);
-static void nbr_idtimer(struct thread *thread);
+static void nbr_idtimer(struct event *thread);
static int nbr_act_session_operational(struct nbr *);
static void nbr_send_labelmappings(struct nbr *);
static __inline int nbr_params_compare(const struct nbr_params *,
@@ -407,7 +407,7 @@ nbr_session_active_role(struct nbr *nbr)
/* Keepalive timer: timer to send keepalive message to neighbors */
-static void nbr_ktimer(struct thread *thread)
+static void nbr_ktimer(struct event *thread)
{
struct nbr *nbr = THREAD_ARG(thread);
@@ -436,7 +436,7 @@ nbr_stop_ktimer(struct nbr *nbr)
/* Keepalive timeout: if the nbr hasn't sent keepalive */
-static void nbr_ktimeout(struct thread *thread)
+static void nbr_ktimeout(struct event *thread)
{
struct nbr *nbr = THREAD_ARG(thread);
@@ -464,7 +464,7 @@ nbr_stop_ktimeout(struct nbr *nbr)
/* Session initialization timeout: if nbr got stuck in the initialization FSM */
-static void nbr_itimeout(struct thread *thread)
+static void nbr_itimeout(struct event *thread)
{
struct nbr *nbr = THREAD_ARG(thread);
@@ -492,7 +492,7 @@ nbr_stop_itimeout(struct nbr *nbr)
/* Init delay timer: timer to retry to iniziatize session */
-static void nbr_idtimer(struct thread *thread)
+static void nbr_idtimer(struct event *thread)
{
struct nbr *nbr = THREAD_ARG(thread);
@@ -549,7 +549,7 @@ nbr_pending_connect(struct nbr *nbr)
return (nbr->ev_connect != NULL);
}
-static void nbr_connect_cb(struct thread *thread)
+static void nbr_connect_cb(struct event *thread)
{
struct nbr *nbr = THREAD_ARG(thread);
int error;
diff --git a/ldpd/packet.c b/ldpd/packet.c
index a253ef466..6770ab73e 100644
--- a/ldpd/packet.c
+++ b/ldpd/packet.c
@@ -17,12 +17,12 @@
static struct iface *disc_find_iface(unsigned int, int,
union ldpd_addr *);
-static void session_read(struct thread *thread);
-static void session_write(struct thread *thread);
+static void session_read(struct event *thread);
+static void session_write(struct event *thread);
static ssize_t session_get_pdu(struct ibuf_read *, char **);
static void tcp_close(struct tcp_conn *);
static struct pending_conn *pending_conn_new(int, int, union ldpd_addr *);
-static void pending_conn_timeout(struct thread *thread);
+static void pending_conn_timeout(struct event *thread);
int
gen_ldp_hdr(struct ibuf *buf, uint16_t size)
@@ -95,10 +95,10 @@ send_packet(int fd, int af, union ldpd_addr *dst, struct iface_af *ia,
}
/* Discovery functions */
-void disc_recv_packet(struct thread *thread)
+void disc_recv_packet(struct event *thread)
{
int fd = THREAD_FD(thread);
- struct thread **threadp = THREAD_ARG(thread);
+ struct event **threadp = THREAD_ARG(thread);
union {
struct cmsghdr hdr;
@@ -290,7 +290,7 @@ disc_find_iface(unsigned int ifindex, int af, union ldpd_addr *src)
return (iface);
}
-void session_accept(struct thread *thread)
+void session_accept(struct event *thread)
{
int fd = THREAD_FD(thread);
struct sockaddr_storage src;
@@ -394,7 +394,7 @@ session_accept_nbr(struct nbr *nbr, int fd)
nbr_fsm(nbr, NBR_EVT_MATCH_ADJ);
}
-static void session_read(struct thread *thread)
+static void session_read(struct event *thread)
{
int fd = THREAD_FD(thread);
struct nbr *nbr = THREAD_ARG(thread);
@@ -610,7 +610,7 @@ static void session_read(struct thread *thread)
free(buf);
}
-static void session_write(struct thread *thread)
+static void session_write(struct event *thread)
{
struct tcp_conn *tcp = THREAD_ARG(thread);
struct nbr *nbr = tcp->nbr;
@@ -795,7 +795,7 @@ pending_conn_find(int af, union ldpd_addr *addr)
return (NULL);
}
-static void pending_conn_timeout(struct thread *thread)
+static void pending_conn_timeout(struct event *thread)
{
struct pending_conn *pconn = THREAD_ARG(thread);
struct tcp_conn *tcp;
diff --git a/lib/agentx.c b/lib/agentx.c
index 2f45ae833..a17ee1725 100644
--- a/lib/agentx.c
+++ b/lib/agentx.c
@@ -28,12 +28,12 @@ DEFINE_HOOK(agentx_enabled, (), ());
static bool agentx_enabled = false;
static struct thread_master *agentx_tm;
-static struct thread *timeout_thr = NULL;
+static struct event *timeout_thr = NULL;
static struct list *events = NULL;
static void agentx_events_update(void);
-static void agentx_timeout(struct thread *t)
+static void agentx_timeout(struct event *t)
{
snmp_timeout();
run_alarms();
@@ -41,13 +41,13 @@ static void agentx_timeout(struct thread *t)
agentx_events_update();
}
-static void agentx_read(struct thread *t)
+static void agentx_read(struct event *t)
{
fd_set fds;
int flags, new_flags = 0;
int nonblock = false;
struct listnode *ln = THREAD_ARG(t);
- struct thread **thr = listgetdata(ln);
+ struct event **thr = listgetdata(ln);
XFREE(MTYPE_TMP, thr);
list_delete_node(events, ln);
@@ -94,7 +94,7 @@ static void agentx_events_update(void)
struct timeval timeout = {.tv_sec = 0, .tv_usec = 0};
fd_set fds;
struct listnode *ln;
- struct thread **thr;
+ struct event **thr;
int fd, thr_fd;
thread_cancel(&timeout_thr);
@@ -130,8 +130,8 @@ static void agentx_events_update(void)
/* need listener, but haven't hit one where it would be */
else if (FD_ISSET(fd, &fds)) {
struct listnode *newln;
- thr = XCALLOC(MTYPE_TMP, sizeof(struct thread *));
+ thr = XCALLOC(MTYPE_TMP, sizeof(struct event *));
newln = listnode_add_before(events, ln, thr);
thread_add_read(agentx_tm, agentx_read, newln, fd, thr);
}
diff --git a/lib/bfd.c b/lib/bfd.c
index c430b1d7e..04f1c27b8 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -87,7 +87,7 @@ struct bfd_session_params {
* configuration load or northbound batch), so we'll use this to
* install/uninstall the BFD session parameters only once.
*/
- struct thread *installev;
+ struct event *installev;
/** BFD session installation state. */
bool installed;
@@ -485,7 +485,7 @@ static bool _bfd_sess_valid(const struct bfd_session_params *bsp)
return true;
}
-static void _bfd_sess_send(struct thread *t)
+static void _bfd_sess_send(struct event *t)
{
struct bfd_session_params *bsp = THREAD_ARG(t);
int rv;
diff --git a/lib/event.c b/lib/event.c
index b0f901ab0..266670e39 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -28,19 +28,19 @@ DEFINE_MTYPE_STATIC(LIB, THREAD_MASTER, "Thread master");
DEFINE_MTYPE_STATIC(LIB, THREAD_POLL, "Thread Poll Info");
DEFINE_MTYPE_STATIC(LIB, THREAD_STATS, "Thread stats");
-DECLARE_LIST(thread_list, struct thread, threaditem);
+DECLARE_LIST(thread_list, struct event, threaditem);
struct cancel_req {
int flags;
- struct thread *thread;
+ struct event *thread;
void *eventobj;
- struct thread **threadref;
+ struct event **threadref;
};
/* Flags for task cancellation */
#define THREAD_CANCEL_FLAG_READY 0x01
-static int thread_timer_cmp(const struct thread *a, const struct thread *b)
+static int thread_timer_cmp(const struct event *a, const struct event *b)
{
if (a->u.sands.tv_sec < b->u.sands.tv_sec)
return -1;
@@ -53,7 +53,7 @@ static int thread_timer_cmp(const struct thread *a, const struct thread *b)
return 0;
}
-DECLARE_HEAP(thread_timer_list, struct thread, timeritem, thread_timer_cmp);
+DECLARE_HEAP(thread_timer_list, struct event, timeritem, thread_timer_cmp);
#if defined(__APPLE__)
#include <mach/mach.h>
@@ -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 thread_master *master, struct thread *thread);
+static void thread_free(struct thread_master *master, struct event *thread);
#ifndef EXCLUDE_CPU_TIME
#define EXCLUDE_CPU_TIME 0
@@ -399,7 +399,7 @@ static void show_thread_poll_helper(struct vty *vty, struct thread_master *m)
{
const char *name = m->name ? m->name : "main";
char underline[strlen(name) + 1];
- struct thread *thread;
+ struct event *thread;
uint32_t i;
memset(underline, '-', sizeof(underline));
@@ -485,7 +485,7 @@ static void show_thread_timers_helper(struct vty *vty, struct thread_master *m)
{
const char *name = m->name ? m->name : "main";
char underline[strlen(name) + 1];
- struct thread *thread;
+ struct event *thread;
memset(underline, '-', sizeof(underline));
underline[sizeof(underline) - 1] = '\0';
@@ -571,10 +571,10 @@ struct thread_master *thread_master_create(const char *name)
}
rv->read = XCALLOC(MTYPE_THREAD_POLL,
- sizeof(struct thread *) * rv->fd_limit);
+ sizeof(struct event *) * rv->fd_limit);
rv->write = XCALLOC(MTYPE_THREAD_POLL,
- sizeof(struct thread *) * rv->fd_limit);
+ sizeof(struct event *) * rv->fd_limit);
char tmhashname[strlen(name) + 32];
snprintf(tmhashname, sizeof(tmhashname), "%s - threadmaster event hash",
@@ -634,14 +634,14 @@ void thread_master_set_name(struct thread_master *master, const char *name)
#define THREAD_UNUSED_DEPTH 10
/* Move thread to unuse list. */
-static void thread_add_unuse(struct thread_master *m, struct thread *thread)
+static void thread_add_unuse(struct thread_master *m, struct event *thread)
{
pthread_mutex_t mtxc = thread->mtx;
assert(m != NULL && thread != NULL);
thread->hist->total_active--;
- memset(thread, 0, sizeof(struct thread));
+ memset(thread, 0, sizeof(struct event));
thread->type = THREAD_UNUSED;
/* Restore the thread mutex context. */
@@ -659,16 +659,16 @@ static void thread_add_unuse(struct thread_master *m, struct thread *thread)
static void thread_list_free(struct thread_master *m,
struct thread_list_head *list)
{
- struct thread *t;
+ struct event *t;
while ((t = thread_list_pop(list)))
thread_free(m, t);
}
static void thread_array_free(struct thread_master *m,
- struct thread **thread_array)
+ struct event **thread_array)
{
- struct thread *t;
+ struct event *t;
int index;
for (index = 0; index < m->fd_limit; ++index) {
@@ -692,7 +692,7 @@ static void thread_array_free(struct thread_master *m,
void thread_master_free_unused(struct thread_master *m)
{
frr_with_mutex (&m->mtx) {
- struct thread *t;
+ struct event *t;
while ((t = thread_list_pop(&m->unuse)))
thread_free(m, t);
}
@@ -701,7 +701,7 @@ void thread_master_free_unused(struct thread_master *m)
/* Stop thread scheduler. */
void thread_master_free(struct thread_master *m)
{
- struct thread *t;
+ struct event *t;
frr_with_mutex (&masters_mtx) {
listnode_delete(masters, m);
@@ -733,7 +733,7 @@ void thread_master_free(struct thread_master *m)
}
/* Return remain time in milliseconds. */
-unsigned long thread_timer_remain_msec(struct thread *thread)
+unsigned long thread_timer_remain_msec(struct event *thread)
{
int64_t remain;
@@ -748,12 +748,12 @@ unsigned long thread_timer_remain_msec(struct thread *thread)
}
/* Return remain time in seconds. */
-unsigned long thread_timer_remain_second(struct thread *thread)
+unsigned long thread_timer_remain_second(struct event *thread)
{
return thread_timer_remain_msec(thread) / 1000LL;
}
-struct timeval thread_timer_remain(struct thread *thread)
+struct timeval thread_timer_remain(struct event *thread)
{
struct timeval remain;
frr_with_mutex (&thread->mtx) {
@@ -780,8 +780,7 @@ static int time_hhmmss(char *buf, int buf_size, long sec)
return wr != 8;
}
-char *thread_timer_to_hhmmss(char *buf, int buf_size,
- struct thread *t_timer)
+char *thread_timer_to_hhmmss(char *buf, int buf_size, struct event *t_timer)
{
if (t_timer) {
time_hhmmss(buf, buf_size,
@@ -793,15 +792,15 @@ char *thread_timer_to_hhmmss(char *buf, int buf_size,
}
/* Get new thread. */
-static struct thread *thread_get(struct thread_master *m, uint8_t type,
- void (*func)(struct thread *), void *arg,
- const struct xref_threadsched *xref)
+static struct event *thread_get(struct thread_master *m, uint8_t type,
+ void (*func)(struct event *), void *arg,
+ const struct xref_threadsched *xref)
{
- struct thread *thread = thread_list_pop(&m->unuse);
+ struct event *thread = thread_list_pop(&m->unuse);
struct cpu_thread_history tmp;
if (!thread) {
- thread = XCALLOC(MTYPE_THREAD, sizeof(struct thread));
+ thread = XCALLOC(MTYPE_THREAD, sizeof(struct event));
/* mutex only needs to be initialized at struct creation. */
pthread_mutex_init(&thread->mtx, NULL);
m->alloc++;
@@ -840,7 +839,7 @@ static struct thread *thread_get(struct thread_master *m, uint8_t type,
return thread;
}
-static void thread_free(struct thread_master *master, struct thread *thread)
+static void thread_free(struct thread_master *master, struct event *thread)
{
/* Update statistics. */
assert(master->alloc > 0);
@@ -951,12 +950,12 @@ done:
/* Add new read thread. */
void _thread_add_read_write(const struct xref_threadsched *xref,
struct thread_master *m,
- void (*func)(struct thread *), void *arg, int fd,
- struct thread **t_ptr)
+ void (*func)(struct event *), void *arg, int fd,
+ struct event **t_ptr)
{
int dir = xref->thread_type;
- struct thread *thread = NULL;
- struct thread **thread_array;
+ struct event *thread = NULL;
+ struct event **thread_array;
if (dir == THREAD_READ)
frrtrace(9, frr_libfrr, schedule_read, m,
@@ -1031,11 +1030,11 @@ void _thread_add_read_write(const struct xref_threadsched *xref,
static void _thread_add_timer_timeval(const struct xref_threadsched *xref,
struct thread_master *m,
- void (*func)(struct thread *), void *arg,
+ void (*func)(struct event *), void *arg,
struct timeval *time_relative,
- struct thread **t_ptr)
+ struct event **t_ptr)
{
- struct thread *thread;
+ struct event *thread;
struct timeval t;
assert(m != NULL);
@@ -1084,8 +1083,8 @@ static void _thread_add_timer_timeval(const struct xref_threadsched *xref,
/* Add timer event thread. */
void _thread_add_timer(const struct xref_threadsched *xref,
- struct thread_master *m, void (*func)(struct thread *),
- void *arg, long timer, struct thread **t_ptr)
+ struct thread_master *m, void (*func)(struct event *),
+ void *arg, long timer, struct event **t_ptr)
{
struct timeval trel;
@@ -1100,8 +1099,8 @@ void _thread_add_timer(const struct xref_threadsched *xref,
/* Add timer event thread with "millisecond" resolution */
void _thread_add_timer_msec(const struct xref_threadsched *xref,
struct thread_master *m,
- void (*func)(struct thread *), void *arg,
- long timer, struct thread **t_ptr)
+ void (*func)(struct event *), void *arg, long timer,
+ struct event **t_ptr)
{
struct timeval trel;
@@ -1115,19 +1114,18 @@ void _thread_add_timer_msec(const struct xref_threadsched *xref,
/* Add timer event thread with "timeval" resolution */
void _thread_add_timer_tv(const struct xref_threadsched *xref,
- struct thread_master *m,
- void (*func)(struct thread *), void *arg,
- struct timeval *tv, struct thread **t_ptr)
+ struct thread_master *m, void (*func)(struct event *),
+ void *arg, struct timeval *tv, struct event **t_ptr)
{
_thread_add_timer_timeval(xref, m, func, arg, tv, t_ptr);
}
/* Add simple event thread. */
void _thread_add_event(const struct xref_threadsched *xref,
- struct thread_master *m, void (*func)(struct thread *),
- void *arg, int val, struct thread **t_ptr)
+ struct thread_master *m, void (*func)(struct event *),
+ void *arg, int val, struct event **t_ptr)
{
- struct thread *thread = NULL;
+ struct event *thread = NULL;
frrtrace(9, frr_libfrr, schedule_event, m,
xref->funcname, xref->xref.file, xref->xref.line,
@@ -1240,7 +1238,7 @@ static void thread_cancel_rw(struct thread_master *master, int fd, short state,
static void cancel_arg_helper(struct thread_master *master,
const struct cancel_req *cr)
{
- struct thread *t;
+ struct event *t;
nfds_t i;
int fd;
struct pollfd *pfd;
@@ -1307,7 +1305,7 @@ static void cancel_arg_helper(struct thread_master *master,
/* Check the timer tasks */
t = thread_timer_list_first(&master->timer);
while (t) {
- struct thread *t_next;
+ struct event *t_next;
t_next = thread_timer_list_next(&master->timer, t);
@@ -1333,8 +1331,8 @@ static void cancel_arg_helper(struct thread_master *master,
static void do_thread_cancel(struct thread_master *master)
{
struct thread_list_head *list = NULL;
- struct thread **thread_array = NULL;
- struct thread *thread;
+ struct event **thread_array = NULL;
+ struct event *thread;
struct cancel_req *cr;
struct listnode *ln;
@@ -1467,7 +1465,7 @@ void thread_cancel_event_ready(struct thread_master *m, void *arg)
*
* @param thread task to cancel
*/
-void thread_cancel(struct thread **thread)
+void thread_cancel(struct event **thread)
{
struct thread_master *master;
@@ -1497,7 +1495,7 @@ void thread_cancel(struct thread **thread)
/**
* Asynchronous cancellation.
*
- * Called with either a struct thread ** or void * to an event argument,
+ * Called with either a struct event ** or void * to an event argument,
* this function posts the correct cancellation request and blocks until it is
* serviced.
*
@@ -1518,7 +1516,7 @@ void thread_cancel(struct thread **thread)
* @param thread pointer to thread to cancel
* @param eventobj the event
*/
-void thread_cancel_async(struct thread_master *master, struct thread **thread,
+void thread_cancel_async(struct thread_master *master, struct event **thread,
void *eventobj)
{
assert(!(thread && eventobj) && (thread || eventobj));
@@ -1566,13 +1564,13 @@ static struct timeval *thread_timer_wait(struct thread_timer_list_head *timers,
if (!thread_timer_list_count(timers))
return NULL;
- struct thread *next_timer = thread_timer_list_first(timers);
+ struct event *next_timer = thread_timer_list_first(timers);
monotime_until(&next_timer->u.sands, timer_val);
return timer_val;
}
-static struct thread *thread_run(struct thread_master *m, struct thread *thread,
- struct thread *fetch)
+static struct event *thread_run(struct thread_master *m, struct event *thread,
+ struct event *fetch)
{
*fetch = *thread;
thread_add_unuse(m, thread);
@@ -1580,10 +1578,10 @@ static struct thread *thread_run(struct thread_master *m, struct thread *thread,
}
static int thread_process_io_helper(struct thread_master *m,
- struct thread *thread, short state,
+ struct event *thread, short state,
short actual_state, int pos)
{
- struct thread **thread_array;
+ struct event **thread_array;
/*
* poll() clears the .events field, but the pollfd array we
@@ -1690,7 +1688,7 @@ static unsigned int thread_process_timers(struct thread_master *m,
{
struct timeval prev = *timenow;
bool displayed = false;
- struct thread *thread;
+ struct event *thread;
unsigned int ready = 0;
while ((thread = thread_timer_list_first(&m->timer))) {
@@ -1729,7 +1727,7 @@ static unsigned int thread_process_timers(struct thread_master *m,
/* process a list en masse, e.g. for event thread lists */
static unsigned int thread_process(struct thread_list_head *list)
{
- struct thread *thread;
+ struct event *thread;
unsigned int ready = 0;
while ((thread = thread_list_pop(list))) {
@@ -1742,9 +1740,9 @@ static unsigned int thread_process(struct thread_list_head *list)
/* Fetch next ready thread. */
-struct thread *thread_fetch(struct thread_master *m, struct thread *fetch)
+struct event *thread_fetch(struct thread_master *m, struct event *fetch)
{
- struct thread *thread = NULL;
+ struct event *thread = NULL;
struct timeval now;
struct timeval zerotime = {0, 0};
struct timeval tv;
@@ -1912,7 +1910,7 @@ unsigned long thread_consumed_time(RUSAGE_T *now, RUSAGE_T *start,
for CPU time. On balance, wall clock time seems to make sense.
Plus it has the added benefit that gettimeofday should be faster
than calling getrusage. */
-int thread_should_yield(struct thread *thread)
+int thread_should_yield(struct event *thread)
{
int result;
frr_with_mutex (&thread->mtx) {
@@ -1922,7 +1920,7 @@ int thread_should_yield(struct thread *thread)
return result;
}
-void thread_set_yield_time(struct thread *thread, unsigned long yield_time)
+void thread_set_yield_time(struct event *thread, unsigned long yield_time)
{
frr_with_mutex (&thread->mtx) {
thread->yield = yield_time;
@@ -1963,7 +1961,7 @@ void thread_getrusage(RUSAGE_T *r)
* particular, the maximum real and cpu times must be monotonically increasing
* or this code is not correct.
*/
-void thread_call(struct thread *thread)
+void thread_call(struct event *thread)
{
RUSAGE_T before, after;
@@ -2060,10 +2058,10 @@ void thread_call(struct thread *thread)
/* Execute thread */
void _thread_execute(const struct xref_threadsched *xref,
- struct thread_master *m, void (*func)(struct thread *),
+ struct thread_master *m, void (*func)(struct event *),
void *arg, int val)
{
- struct thread *thread;
+ struct event *thread;
/* Get or allocate new thread to execute. */
frr_with_mutex (&m->mtx) {
@@ -2131,7 +2129,7 @@ void debug_signals(const sigset_t *sigs)
}
static ssize_t printfrr_thread_dbg(struct fbuf *buf, struct printfrr_eargs *ea,
- const struct thread *thread)
+ const struct event *thread)
{
static const char * const types[] = {
[THREAD_READ] = "read",
@@ -2176,7 +2174,7 @@ printfrr_ext_autoreg_p("TH", printfrr_thread);
static ssize_t printfrr_thread(struct fbuf *buf, struct printfrr_eargs *ea,
const void *ptr)
{
- const struct thread *thread = ptr;
+ const struct event *thread = ptr;
struct timespec remain = {};
if (ea->fmt[0] == 'D') {
diff --git a/lib/event.h b/lib/event.h
index 128d11b6e..e1d3ad68a 100644
--- a/lib/event.h
+++ b/lib/event.h
@@ -69,8 +69,8 @@ struct xref_threadsched {
struct thread_master {
char *name;
- struct thread **read;
- struct thread **write;
+ struct event **read;
+ struct event **write;
struct thread_timer_list_head timer;
struct thread_list_head event, ready, unuse;
struct list *cancel_req;
@@ -92,14 +92,14 @@ struct thread_master {
};
/* Thread itself. */
-struct thread {
+struct event {
uint8_t type; /* thread type */
uint8_t add_type; /* thread type */
struct thread_list_item threaditem;
struct thread_timer_list_item timeritem;
- struct thread **ref; /* external reference (if given) */
+ struct event **ref; /* external reference (if given) */
struct thread_master *master; /* pointer to the struct thread_master */
- void (*func)(struct thread *); /* event function */
+ void (*func)(struct event *); /* event function */
void *arg; /* event argument */
union {
int val; /* second argument of the event. */
@@ -115,11 +115,11 @@ struct thread {
};
#ifdef _FRR_ATTRIBUTE_PRINTFRR
-#pragma FRR printfrr_ext "%pTH" (struct thread *)
+#pragma FRR printfrr_ext "%pTH"(struct event *)
#endif
struct cpu_thread_history {
- void (*func)(struct thread *);
+ void (*func)(struct event *);
atomic_size_t total_cpu_warn;
atomic_size_t total_wall_warn;
atomic_size_t total_starv_warn;
@@ -212,48 +212,48 @@ extern void thread_master_free_unused(struct thread_master *);
extern void _thread_add_read_write(const struct xref_threadsched *xref,
struct thread_master *master,
- void (*fn)(struct thread *), void *arg,
- int fd, struct thread **tref);
+ void (*fn)(struct event *), void *arg,
+ int fd, struct event **tref);
extern void _thread_add_timer(const struct xref_threadsched *xref,
struct thread_master *master,
- void (*fn)(struct thread *), void *arg, long t,
- struct thread **tref);
+ void (*fn)(struct event *), void *arg, long t,
+ struct event **tref);
extern void _thread_add_timer_msec(const struct xref_threadsched *xref,
struct thread_master *master,
- void (*fn)(struct thread *), void *arg,
- long t, struct thread **tref);
+ void (*fn)(struct event *), void *arg,
+ long t, struct event **tref);
extern void _thread_add_timer_tv(const struct xref_threadsched *xref,
struct thread_master *master,
- void (*fn)(struct thread *), void *arg,
- struct timeval *tv, struct thread **tref);
+ void (*fn)(struct event *), void *arg,
+ struct timeval *tv, struct event **tref);
extern void _thread_add_event(const struct xref_threadsched *xref,
struct thread_master *master,
- void (*fn)(struct thread *), void *arg, int val,
- struct thread **tref);
+ void (*fn)(struct event *), void *arg, int val,
+ struct event **tref);
extern void _thread_execute(const struct xref_threadsched *xref,
struct thread_master *master,
- void (*fn)(struct thread *), void *arg, int val);
+ void (*fn)(struct event *), void *arg, int val);
-extern void thread_cancel(struct thread **event);
-extern void thread_cancel_async(struct thread_master *, struct thread **,
+extern void thread_cancel(struct event **event);
+extern void thread_cancel_async(struct thread_master *, struct event **,
void *);
/* Cancel ready tasks with an arg matching 'arg' */
extern void thread_cancel_event_ready(struct thread_master *m, void *arg);
/* Cancel all tasks with an arg matching 'arg', including timers and io */
extern void thread_cancel_event(struct thread_master *m, void *arg);
-extern struct thread *thread_fetch(struct thread_master *, struct thread *);
-extern void thread_call(struct thread *);
-extern unsigned long thread_timer_remain_second(struct thread *);
-extern struct timeval thread_timer_remain(struct thread *);
-extern unsigned long thread_timer_remain_msec(struct thread *);
-extern int thread_should_yield(struct thread *);
+extern struct event *thread_fetch(struct thread_master *, struct event *event);
+extern void thread_call(struct event *event);
+extern unsigned long thread_timer_remain_second(struct event *event);
+extern struct timeval thread_timer_remain(struct event *event);
+extern unsigned long thread_timer_remain_msec(struct event *event);
+extern int thread_should_yield(struct event *event);
/* set yield time for thread */
-extern void thread_set_yield_time(struct thread *, unsigned long);
+extern void thread_set_yield_time(struct event *event, unsigned long);
/* Internal libfrr exports */
extern void thread_getrusage(RUSAGE_T *);
@@ -266,9 +266,9 @@ extern unsigned long thread_consumed_time(RUSAGE_T *after, RUSAGE_T *before,
/* only for use in logging functions! */
extern pthread_key_t thread_current;
extern char *thread_timer_to_hhmmss(char *buf, int buf_size,
- struct thread *t_timer);
+ struct event *t_timer);
-static inline bool thread_is_scheduled(struct thread *thread)
+static inline bool thread_is_scheduled(struct event *thread)
{
if (thread)
return true;
@@ -279,9 +279,9 @@ static inline bool thread_is_scheduled(struct thread *thread)
/* Debug signal mask */
void debug_signals(const sigset_t *sigs);
-static inline void thread_ignore_late_timer(struct thread *thread)
+static inline void thread_ignore_late_timer(struct event *event)
{
- thread->ignore_timer_late = true;
+ event->ignore_timer_late = true;
}
#ifdef __cplusplus
diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c
index 0c617238f..9f026868d 100644
--- a/lib/frr_pthread.c
+++ b/lib/frr_pthread.c
@@ -224,12 +224,12 @@ void frr_pthread_stop_all(void)
*/
/* dummy task for sleeper pipe */
-static void fpt_dummy(struct thread *thread)
+static void fpt_dummy(struct event *thread)
{
}
/* poison pill task to end event loop */
-static void fpt_finish(struct thread *thread)
+static void fpt_finish(struct event *thread)
{
struct frr_pthread *fpt = THREAD_ARG(thread);
@@ -289,7 +289,7 @@ static void *fpt_run(void *arg)
frr_pthread_notify_running(fpt);
- struct thread task;
+ struct event task;
while (atomic_load_explicit(&fpt->running, memory_order_relaxed)) {
pthread_testcancel();
if (thread_fetch(fpt->master, &task)) {
diff --git a/lib/frr_zmq.c b/lib/frr_zmq.c
index 525e49942..30c51230c 100644
--- a/lib/frr_zmq.c
+++ b/lib/frr_zmq.c
@@ -43,7 +43,7 @@ void frrzmq_finish(void)
}
}
-static void frrzmq_read_msg(struct thread *t)
+static void frrzmq_read_msg(struct event *t)
{
struct frrzmq_cb **cbp = THREAD_ARG(t);
struct frrzmq_cb *cb;
@@ -201,7 +201,7 @@ int _frrzmq_thread_add_read(const struct xref_threadsched *xref,
return 0;
}
-static void frrzmq_write_msg(struct thread *t)
+static void frrzmq_write_msg(struct event *t)
{
struct frrzmq_cb **cbp = THREAD_ARG(t);
struct frrzmq_cb *cb;
diff --git a/lib/frr_zmq.h b/lib/frr_zmq.h
index bfc1e93b1..d90088edb 100644
--- a/lib/frr_zmq.h
+++ b/lib/frr_zmq.h
@@ -26,7 +26,7 @@ extern "C" {
/* callback integration */
struct cb_core {
- struct thread *thread;
+ struct event *thread;
void *arg;
bool cancelled;
diff --git a/lib/grammar_sandbox_main.c b/lib/grammar_sandbox_main.c
index cdb1c3adb..261a13063 100644
--- a/lib/grammar_sandbox_main.c
+++ b/lib/grammar_sandbox_main.c
@@ -27,7 +27,7 @@ struct thread_master *master;
int main(int argc, char **argv)
{
- struct thread thread;
+ struct event event;
master = thread_master_create(NULL);
@@ -45,8 +45,8 @@ int main(int argc, char **argv)
vty_stdio(vty_do_exit);
/* Fetch next active thread. */
- while (thread_fetch(master, &thread))
- thread_call(&thread);
+ while (thread_fetch(master, &event))
+ thread_call(&event);
/* Not reached. */
exit(0);
diff --git a/lib/ldp_sync.h b/lib/ldp_sync.h
index 5b6ebbf88..f7601ebf9 100644
--- a/lib/ldp_sync.h
+++ b/lib/ldp_sync.h
@@ -37,7 +37,7 @@ struct ldp_sync_info {
uint8_t enabled; /* enabled */
uint8_t state; /* running state */
uint16_t holddown; /* timer value */
- struct thread *t_holddown; /* holddown timer*/
+ struct event *t_holddown; /* holddown timer*/
uint32_t metric[2]; /* isis interface metric */
};
diff --git a/lib/libfrr.c b/lib/libfrr.c
index d1b7dd133..433e9cb14 100644
--- a/lib/libfrr.c
+++ b/lib/libfrr.c
@@ -964,7 +964,7 @@ static void frr_daemonize(void)
* to read the config in after thread execution starts, so that
* we can match this behavior.
*/
-static void frr_config_read_in(struct thread *t)
+static void frr_config_read_in(struct event *t)
{
hook_call(frr_config_pre, master);
@@ -1095,9 +1095,9 @@ static void frr_terminal_close(int isexit)
}
}
-static struct thread *daemon_ctl_thread = NULL;
+static struct event *daemon_ctl_thread = NULL;
-static void frr_daemon_ctl(struct thread *t)
+static void frr_daemon_ctl(struct event *t)
{
char buf[1];
ssize_t nr;
@@ -1180,7 +1180,7 @@ void frr_run(struct thread_master *master)
/* end fixed stderr startup logging */
zlog_startup_end();
- struct thread thread;
+ struct event thread;
while (thread_fetch(master, &thread))
thread_call(&thread);
}
diff --git a/lib/libfrr.h b/lib/libfrr.h
index 365734650..5463222d7 100644
--- a/lib/libfrr.h
+++ b/lib/libfrr.h
@@ -70,7 +70,7 @@ struct frr_daemon_info {
bool terminal;
enum frr_cli_mode cli_mode;
- struct thread *read_in;
+ struct event *read_in;
const char *config_file;
const char *backup_config_file;
const char *pid_file;
diff --git a/lib/libfrr_trace.h b/lib/libfrr_trace.h
index d13cdc20b..2a1bb2f6c 100644
--- a/lib/libfrr_trace.h
+++ b/lib/libfrr_trace.h
@@ -74,7 +74,7 @@ TRACEPOINT_LOGLEVEL(frr_libfrr, hash_release, TRACE_INFO)
#define THREAD_SCHEDULE_ARGS \
TP_ARGS(struct thread_master *, master, const char *, funcname, \
- const char *, schedfrom, int, fromln, struct thread **, \
+ const char *, schedfrom, int, fromln, struct event **, \
thread_ptr, int, fd, int, val, void *, arg, long, time)
TRACEPOINT_EVENT_CLASS(
diff --git a/lib/log.c b/lib/log.c
index f7ab86fd9..00b897dca 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -140,7 +140,7 @@ void zlog_signal(int signo, const char *action, void *siginfo_v,
fb.pos = buf;
- struct thread *tc;
+ struct event *tc;
tc = pthread_getspecific(thread_current);
if (!tc)
@@ -284,7 +284,7 @@ void zlog_backtrace(int priority)
void zlog_thread_info(int log_level)
{
- struct thread *tc;
+ struct event *tc;
tc = pthread_getspecific(thread_current);
if (tc)
diff --git a/lib/mgmt_be_client.c b/lib/mgmt_be_client.c
index bb45024d0..b70c00635 100644
--- a/lib/mgmt_be_client.c
+++ b/lib/mgmt_be_client.c
@@ -106,11 +106,11 @@ DECLARE_LIST(mgmt_be_txns, struct mgmt_be_txn_ctx, list_linkage);
struct mgmt_be_client_ctx {
int conn_fd;
struct thread_master *tm;
- struct thread *conn_retry_tmr;
- struct thread *conn_read_ev;
- struct thread *conn_write_ev;
- struct thread *conn_writes_on;
- struct thread *msg_proc_ev;
+ struct event *conn_retry_tmr;
+ struct event *conn_read_ev;
+ struct event *conn_write_ev;
+ struct event *conn_writes_on;
+ struct event *msg_proc_ev;
uint32_t flags;
struct mgmt_msg_state mstate;
@@ -897,7 +897,7 @@ static void mgmt_be_client_process_msg(void *user_ctx, uint8_t *data,
mgmtd__be_message__free_unpacked(be_msg, NULL);
}
-static void mgmt_be_client_proc_msgbufs(struct thread *thread)
+static void mgmt_be_client_proc_msgbufs(struct event *thread)
{
struct mgmt_be_client_ctx *client_ctx = THREAD_ARG(thread);
@@ -906,7 +906,7 @@ static void mgmt_be_client_proc_msgbufs(struct thread *thread)
mgmt_be_client_register_event(client_ctx, MGMTD_BE_PROC_MSG);
}
-static void mgmt_be_client_read(struct thread *thread)
+static void mgmt_be_client_read(struct event *thread)
{
struct mgmt_be_client_ctx *client_ctx = THREAD_ARG(thread);
enum mgmt_msg_rsched rv;
@@ -962,7 +962,7 @@ static int mgmt_be_client_send_msg(struct mgmt_be_client_ctx *client_ctx,
return rv;
}
-static void mgmt_be_client_write(struct thread *thread)
+static void mgmt_be_client_write(struct event *thread)
{
struct mgmt_be_client_ctx *client_ctx = THREAD_ARG(thread);
enum mgmt_msg_wsched rv;
@@ -981,7 +981,7 @@ static void mgmt_be_client_write(struct thread *thread)
assert(rv == MSW_SCHED_NONE);
}
-static void mgmt_be_client_resume_writes(struct thread *thread)
+static void mgmt_be_client_resume_writes(struct event *thread)
{
struct mgmt_be_client_ctx *client_ctx;
@@ -1040,7 +1040,7 @@ static void mgmt_be_server_connect(struct mgmt_be_client_ctx *client_ctx)
client_ctx->client_params.user_data, true);
}
-static void mgmt_be_client_conn_timeout(struct thread *thread)
+static void mgmt_be_client_conn_timeout(struct event *thread)
{
mgmt_be_server_connect(THREAD_ARG(thread));
}
diff --git a/lib/mgmt_fe_client.c b/lib/mgmt_fe_client.c
index 362492212..c0d897ab2 100644
--- a/lib/mgmt_fe_client.c
+++ b/lib/mgmt_fe_client.c
@@ -50,11 +50,11 @@ DEFINE_MTYPE_STATIC(LIB, MGMTD_FE_SESSION, "MGMTD Frontend session");
struct mgmt_fe_client_ctx {
int conn_fd;
struct thread_master *tm;
- struct thread *conn_retry_tmr;
- struct thread *conn_read_ev;
- struct thread *conn_write_ev;
- struct thread *conn_writes_on;
- struct thread *msg_proc_ev;
+ struct event *conn_retry_tmr;
+ struct event *conn_read_ev;
+ struct event *conn_write_ev;
+ struct event *conn_writes_on;
+ struct event *msg_proc_ev;
uint32_t flags;
struct mgmt_msg_state mstate;
@@ -174,7 +174,7 @@ static int mgmt_fe_client_send_msg(struct mgmt_fe_client_ctx *client_ctx,
return rv;
}
-static void mgmt_fe_client_write(struct thread *thread)
+static void mgmt_fe_client_write(struct event *thread)
{
struct mgmt_fe_client_ctx *client_ctx;
enum mgmt_msg_wsched rv;
@@ -194,7 +194,7 @@ static void mgmt_fe_client_write(struct thread *thread)
assert(rv == MSW_SCHED_NONE);
}
-static void mgmt_fe_client_resume_writes(struct thread *thread)
+static void mgmt_fe_client_resume_writes(struct event *thread)
{
struct mgmt_fe_client_ctx *client_ctx;
@@ -670,7 +670,7 @@ static void mgmt_fe_client_process_msg(void *user_ctx, uint8_t *data,
mgmtd__fe_message__free_unpacked(fe_msg, NULL);
}
-static void mgmt_fe_client_proc_msgbufs(struct thread *thread)
+static void mgmt_fe_client_proc_msgbufs(struct event *thread)
{
struct mgmt_fe_client_ctx *client_ctx;
@@ -680,7 +680,7 @@ static void mgmt_fe_client_proc_msgbufs(struct thread *thread)
mgmt_fe_client_register_event(client_ctx, MGMTD_FE_PROC_MSG);
}
-static void mgmt_fe_client_read(struct thread *thread)
+static void mgmt_fe_client_read(struct event *thread)
{
struct mgmt_fe_client_ctx *client_ctx;
enum mgmt_msg_rsched rv;
@@ -725,7 +725,7 @@ static void mgmt_fe_server_connect(struct mgmt_fe_client_ctx *client_ctx)
}
-static void mgmt_fe_client_conn_timeout(struct thread *thread)
+static void mgmt_fe_client_conn_timeout(struct event *thread)
{
mgmt_fe_server_connect(THREAD_ARG(thread));
}
diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c
index 281d9a470..6d0ee100b 100644
--- a/lib/northbound_cli.c
+++ b/lib/northbound_cli.c
@@ -300,7 +300,7 @@ int nb_cli_confirmed_commit_rollback(struct vty *vty)
return ret;
}
-static void nb_cli_confirmed_commit_timeout(struct thread *thread)
+static void nb_cli_confirmed_commit_timeout(struct event *thread)
{
struct vty *vty = THREAD_ARG(thread);
diff --git a/lib/northbound_confd.c b/lib/northbound_confd.c
index ee1956851..f0084e576 100644
--- a/lib/northbound_confd.c
+++ b/lib/northbound_confd.c
@@ -26,7 +26,7 @@ static struct debug nb_dbg_client_confd = {0, "Northbound client: ConfD"};
static struct thread_master *master;
static struct sockaddr confd_addr;
static int cdb_sub_sock, dp_ctl_sock, dp_worker_sock;
-static struct thread *t_cdb_sub, *t_dp_ctl, *t_dp_worker;
+static struct event *t_cdb_sub, *t_dp_ctl, *t_dp_worker;
static struct confd_daemon_ctx *dctx;
static struct confd_notification_ctx *live_ctx;
static bool confd_connected;
@@ -401,7 +401,7 @@ static int frr_confd_cdb_read_cb_abort(int fd, int *subp, int reslen)
return 0;
}
-static void frr_confd_cdb_read_cb(struct thread *thread)
+static void frr_confd_cdb_read_cb(struct event *thread)
{
int fd = THREAD_FD(thread);
enum cdb_sub_notification cdb_ev;
@@ -1173,7 +1173,7 @@ static int frr_confd_dp_read(struct confd_daemon_ctx *dctx, int fd)
return 0;
}
-static void frr_confd_dp_ctl_read(struct thread *thread)
+static void frr_confd_dp_ctl_read(struct event *thread)
{
struct confd_daemon_ctx *dctx = THREAD_ARG(thread);
int fd = THREAD_FD(thread);
@@ -1183,7 +1183,7 @@ static void frr_confd_dp_ctl_read(struct thread *thread)
frr_confd_dp_read(dctx, fd);
}
-static void frr_confd_dp_worker_read(struct thread *thread)
+static void frr_confd_dp_worker_read(struct event *thread)
{
struct confd_daemon_ctx *dctx = THREAD_ARG(thread);
int fd = THREAD_FD(thread);
diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp
index d68e22368..4de2b0e33 100644
--- a/lib/northbound_grpc.cpp
+++ b/lib/northbound_grpc.cpp
@@ -181,9 +181,9 @@ class RpcStateBase
}
protected:
- virtual CallState run_mainthread(struct thread *thread) = 0;
+ virtual CallState run_mainthread(struct event *thread) = 0;
- static void c_callback(struct thread *thread)
+ static void c_callback(struct event *thread)
{
auto _tag = static_cast<RpcStateBase *>(THREAD_ARG(thread));
/*
@@ -250,7 +250,7 @@ template <typename Q, typename S> class UnaryRpcState : public RpcStateBase
&copy->responder, cq, cq, copy);
}
- CallState run_mainthread(struct thread *thread) override
+ CallState run_mainthread(struct event *thread) override
{
// Unary RPC are always finished, see "Unary" :)
grpc::Status status = this->callback(this);
@@ -302,7 +302,7 @@ class StreamRpcState : public RpcStateBase
&copy->async_responder, cq, cq, copy);
}
- CallState run_mainthread(struct thread *thread) override
+ CallState run_mainthread(struct event *thread) override
{
if (this->callback(this))
return MORE;
@@ -1275,7 +1275,7 @@ static int frr_grpc_finish(void)
* fork. This is done by scheduling this init function as an event task, since
* the event loop doesn't run until after fork.
*/
-static void frr_grpc_module_very_late_init(struct thread *thread)
+static void frr_grpc_module_very_late_init(struct event *thread)
{
const char *args = THIS_MODULE->load_args;
uint port = GRPC_DEFAULT_PORT;
diff --git a/lib/northbound_sysrepo.c b/lib/northbound_sysrepo.c
index 337fb690d..9b0d2817d 100644
--- a/lib/northbound_sysrepo.c
+++ b/lib/northbound_sysrepo.c
@@ -28,7 +28,7 @@ static sr_session_ctx_t *session;
static sr_conn_ctx_t *connection;
static struct nb_transaction *transaction;
-static void frr_sr_read_cb(struct thread *thread);
+static void frr_sr_read_cb(struct event *thread);
static int frr_sr_finish(void);
/* Convert FRR YANG data value to sysrepo YANG data value. */
@@ -514,7 +514,7 @@ static int frr_sr_notification_send(const char *xpath, struct list *arguments)
return NB_OK;
}
-static void frr_sr_read_cb(struct thread *thread)
+static void frr_sr_read_cb(struct event *thread)
{
struct yang_module *module = THREAD_ARG(thread);
int fd = THREAD_FD(thread);
diff --git a/lib/pullwr.c b/lib/pullwr.c
index 5bc566c28..de07ca168 100644
--- a/lib/pullwr.c
+++ b/lib/pullwr.c
@@ -18,7 +18,7 @@ struct pullwr {
int fd;
struct thread_master *tm;
/* writer == NULL <=> we're idle */
- struct thread *writer;
+ struct event *writer;
void *arg;
void (*fill)(void *, struct pullwr *);
@@ -38,7 +38,7 @@ struct pullwr {
DEFINE_MTYPE_STATIC(LIB, PULLWR_HEAD, "pull-driven write controller");
DEFINE_MTYPE_STATIC(LIB, PULLWR_BUF, "pull-driven write buffer");
-static void pullwr_run(struct thread *t);
+static void pullwr_run(struct event *t);
struct pullwr *_pullwr_new(struct thread_master *tm, int fd,
void *arg,
@@ -176,7 +176,7 @@ void pullwr_write(struct pullwr *pullwr, const void *data, size_t len)
pullwr_bump(pullwr);
}
-static void pullwr_run(struct thread *t)
+static void pullwr_run(struct event *t)
{
struct pullwr *pullwr = THREAD_ARG(t);
struct iovec iov[2];
diff --git a/lib/resolver.c b/lib/resolver.c
index ffc84e5fe..c455b9bd2 100644
--- a/lib/resolver.c
+++ b/lib/resolver.c
@@ -24,7 +24,7 @@ XREF_SETUP();
struct resolver_state {
ares_channel channel;
struct thread_master *master;
- struct thread *timeout;
+ struct event *timeout;
};
static struct resolver_state state;
@@ -47,7 +47,7 @@ struct resolver_fd {
int fd;
struct resolver_state *state;
- struct thread *t_read, *t_write;
+ struct event *t_read, *t_write;
};
static int resolver_fd_cmp(const struct resolver_fd *a,
@@ -100,7 +100,7 @@ static void resolver_fd_drop_maybe(struct resolver_fd *resfd)
static void resolver_update_timeouts(struct resolver_state *r);
-static void resolver_cb_timeout(struct thread *t)
+static void resolver_cb_timeout(struct event *t)
{
struct resolver_state *r = THREAD_ARG(t);
@@ -108,7 +108,7 @@ static void resolver_cb_timeout(struct thread *t)
resolver_update_timeouts(r);
}
-static void resolver_cb_socket_readable(struct thread *t)
+static void resolver_cb_socket_readable(struct event *t)
{
struct resolver_fd *resfd = THREAD_ARG(t);
struct resolver_state *r = resfd->state;
@@ -123,7 +123,7 @@ static void resolver_cb_socket_readable(struct thread *t)
resolver_update_timeouts(r);
}
-static void resolver_cb_socket_writable(struct thread *t)
+static void resolver_cb_socket_writable(struct event *t)
{
struct resolver_fd *resfd = THREAD_ARG(t);
struct resolver_state *r = resfd->state;
@@ -222,7 +222,7 @@ static void ares_address_cb(void *arg, int status, int timeouts,
callback(query, NULL, i, &addr[0]);
}
-static void resolver_cb_literal(struct thread *t)
+static void resolver_cb_literal(struct event *t)
{
struct resolver_query *query = THREAD_ARG(t);
void (*callback)(struct resolver_query *, const char *, int,
diff --git a/lib/resolver.h b/lib/resolver.h
index 764e3e72a..6e69fa263 100644
--- a/lib/resolver.h
+++ b/lib/resolver.h
@@ -19,7 +19,7 @@ struct resolver_query {
/* used to immediate provide the result if IP literal is passed in */
union sockunion literal_addr;
- struct thread *literal_cb;
+ struct event *literal_cb;
};
void resolver_init(struct thread_master *tm);
diff --git a/lib/sigevent.c b/lib/sigevent.c
index 3ed34894e..40da4f3fc 100644
--- a/lib/sigevent.c
+++ b/lib/sigevent.c
@@ -22,7 +22,7 @@
/* master signals descriptor struct */
static struct frr_sigevent_master_t {
- struct thread *t;
+ struct event *t;
struct frr_signal_t *signals;
int sigc;
@@ -127,7 +127,7 @@ int frr_sigevent_process(void)
#ifdef SIGEVENT_SCHEDULE_THREAD
/* timer thread to check signals. shouldn't be needed */
-void frr_signal_timer(struct thread *t)
+void frr_signal_timer(struct event *t)
{
struct frr_sigevent_master_t *sigm;
diff --git a/lib/spf_backoff.c b/lib/spf_backoff.c
index 36b059a99..b77f782ee 100644
--- a/lib/spf_backoff.c
+++ b/lib/spf_backoff.c
@@ -48,8 +48,8 @@ struct spf_backoff {
/* State machine */
enum spf_backoff_state state;
- struct thread *t_holddown;
- struct thread *t_timetolearn;
+ struct event *t_holddown;
+ struct event *t_timetolearn;
/* For debugging */
char *name;
@@ -104,7 +104,7 @@ void spf_backoff_free(struct spf_backoff *backoff)
XFREE(MTYPE_SPF_BACKOFF, backoff);
}
-static void spf_backoff_timetolearn_elapsed(struct thread *thread)
+static void spf_backoff_timetolearn_elapsed(struct event *thread)
{
struct spf_backoff *backoff = THREAD_ARG(thread);
@@ -113,7 +113,7 @@ static void spf_backoff_timetolearn_elapsed(struct thread *thread)
backoff->name, spf_backoff_state2str(backoff->state));
}
-static void spf_backoff_holddown_elapsed(struct thread *thread)
+static void spf_backoff_holddown_elapsed(struct event *thread)
{
struct spf_backoff *backoff = THREAD_ARG(thread);
diff --git a/lib/systemd.c b/lib/systemd.c
index 458bea514..14a09362d 100644
--- a/lib/systemd.c
+++ b/lib/systemd.c
@@ -65,7 +65,7 @@ void systemd_send_stopping(void)
static struct thread_master *systemd_master = NULL;
-static void systemd_send_watchdog(struct thread *t)
+static void systemd_send_watchdog(struct event *t)
{
systemd_send_information("WATCHDOG=1");
diff --git a/lib/vty.c b/lib/vty.c
index c6bc29d96..aaf7db0f8 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -81,7 +81,7 @@ struct vty_serv {
int sock;
bool vtysh;
- struct thread *t_accept;
+ struct event *t_accept;
};
DECLARE_DLIST(vtyservs, struct vty_serv, itm);
@@ -1360,7 +1360,7 @@ static void vty_buffer_reset(struct vty *vty)
}
/* Read data via vty socket. */
-static void vty_read(struct thread *thread)
+static void vty_read(struct event *thread)
{
int i;
int nbytes;
@@ -1563,7 +1563,7 @@ static void vty_read(struct thread *thread)
}
/* Flush buffer to the vty. */
-static void vty_flush(struct thread *thread)
+static void vty_flush(struct event *thread)
{
int erase;
buffer_status_t flushrc;
@@ -1823,7 +1823,7 @@ struct vty *vty_stdio(void (*atclose)(int isexit))
}
/* Accept connection from the network. */
-static void vty_accept(struct thread *thread)
+static void vty_accept(struct event *thread)
{
struct vty_serv *vtyserv = THREAD_ARG(thread);
int vty_sock;
@@ -2036,7 +2036,7 @@ static void vty_serv_un(const char *path)
/* #define VTYSH_DEBUG 1 */
-static void vtysh_accept(struct thread *thread)
+static void vtysh_accept(struct event *thread)
{
struct vty_serv *vtyserv = THREAD_ARG(thread);
int accept_sock = vtyserv->sock;
@@ -2166,7 +2166,7 @@ void vty_pass_fd(struct vty *vty, int fd)
vty->pass_fd = fd;
}
-static void vtysh_read(struct thread *thread)
+static void vtysh_read(struct event *thread)
{
int ret;
int sock;
@@ -2275,7 +2275,7 @@ static void vtysh_read(struct thread *thread)
vty_event(VTYSH_READ, vty);
}
-static void vtysh_write(struct thread *thread)
+static void vtysh_write(struct event *thread)
{
struct vty *vty = THREAD_ARG(thread);
@@ -2382,7 +2382,7 @@ void vty_close(struct vty *vty)
}
/* When time out occur output message then close connection. */
-static void vty_timeout(struct thread *thread)
+static void vty_timeout(struct event *thread)
{
struct vty *vty;
diff --git a/lib/vty.h b/lib/vty.h
index 52453d0da..856c352be 100644
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -148,7 +148,7 @@ struct vty {
size_t pending_cmds_bufpos;
/* Confirmed-commit timeout and rollback configuration. */
- struct thread *t_confirmed_commit_timeout;
+ struct event *t_confirmed_commit_timeout;
struct nb_config *confirmed_commit_rollback;
/* qobj object ID (replacement for "index") */
@@ -202,12 +202,12 @@ struct vty {
int lines;
/* Read and write thread. */
- struct thread *t_read;
- struct thread *t_write;
+ struct event *t_read;
+ struct event *t_write;
/* Timeout seconds and thread. */
unsigned long v_timeout;
- struct thread *t_timeout;
+ struct event *t_timeout;
/* What address is this vty comming from. */
char address[SU_ADDRSTRLEN];
diff --git a/lib/wheel.c b/lib/wheel.c
index bd12105a3..363b27ab1 100644
--- a/lib/wheel.c
+++ b/lib/wheel.c
@@ -16,9 +16,9 @@ DEFINE_MTYPE_STATIC(LIB, TIMER_WHEEL_LIST, "Timer Wheel Slot List");
static int debug_timer_wheel = 0;
-static void wheel_timer_thread(struct thread *t);
+static void wheel_timer_thread(struct event *t);
-static void wheel_timer_thread_helper(struct thread *t)
+static void wheel_timer_thread_helper(struct event *t)
{
struct listnode *node, *nextnode;
unsigned long long curr_slot;
@@ -51,7 +51,7 @@ static void wheel_timer_thread_helper(struct thread *t)
wheel->nexttime * slots_to_skip, &wheel->timer);
}
-static void wheel_timer_thread(struct thread *t)
+static void wheel_timer_thread(struct event *t)
{
struct timer_wheel *wheel;
diff --git a/lib/wheel.h b/lib/wheel.h
index 9aa808cdf..f4e72af9d 100644
--- a/lib/wheel.h
+++ b/lib/wheel.h
@@ -21,7 +21,7 @@ struct timer_wheel {
unsigned int slots_to_skip;
struct list **wheel_slot_lists;
- struct thread *timer;
+ struct event *timer;
/*
* Key to determine what slot the item belongs in
*/
diff --git a/lib/workqueue.c b/lib/workqueue.c
index e1ab4c48d..50a0ad388 100644
--- a/lib/workqueue.c
+++ b/lib/workqueue.c
@@ -218,7 +218,7 @@ void work_queue_unplug(struct work_queue *wq)
* will reschedule itself if required,
* otherwise work_queue_item_add
*/
-void work_queue_run(struct thread *thread)
+void work_queue_run(struct event *thread)
{
struct work_queue *wq;
struct work_queue_item *item, *titem;
diff --git a/lib/workqueue.h b/lib/workqueue.h
index c7ed14b05..f3c8fc813 100644
--- a/lib/workqueue.h
+++ b/lib/workqueue.h
@@ -48,7 +48,7 @@ struct work_queue {
* the following may be read
*/
struct thread_master *master; /* thread master */
- struct thread *thread; /* thread, if one is active */
+ struct event *thread; /* thread, if one is active */
char *name; /* work queue name */
/* Specification for this work queue.
@@ -158,7 +158,7 @@ extern void work_queue_unplug(struct work_queue *wq);
bool work_queue_is_scheduled(struct work_queue *wq);
/* Helpers, exported for thread.c and command.c */
-extern void work_queue_run(struct thread *thread);
+extern void work_queue_run(struct event *thread);
extern void workqueue_cmd_init(void);
diff --git a/lib/yang.h b/lib/yang.h
index 91cd641ce..654c246f0 100644
--- a/lib/yang.h
+++ b/lib/yang.h
@@ -50,7 +50,7 @@ struct yang_module {
#endif
#ifdef HAVE_SYSREPO
sr_subscription_ctx_t *sr_subscription;
- struct thread *sr_thread;
+ struct event *sr_thread;
#endif
};
RB_HEAD(yang_modules, yang_module);
diff --git a/lib/zclient.c b/lib/zclient.c
index 2cd80cc58..bb5d66df5 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -249,7 +249,7 @@ static enum zclient_send_status zclient_failed(struct zclient *zclient)
return ZCLIENT_SEND_FAILURE;
}
-static void zclient_flush_data(struct thread *thread)
+static void zclient_flush_data(struct event *thread)
{
struct zclient *zclient = THREAD_ARG(thread);
@@ -744,7 +744,7 @@ void zclient_init(struct zclient *zclient, int redist_default,
/* This function is a wrapper function for calling zclient_start from
timer or event thread. */
-static void zclient_connect(struct thread *t)
+static void zclient_connect(struct event *t)
{
struct zclient *zclient;
@@ -4026,7 +4026,7 @@ static zclient_handler *const lib_handlers[] = {
};
/* Zebra client message read function. */
-static void zclient_read(struct thread *thread)
+static void zclient_read(struct event *thread)
{
size_t already;
uint16_t length, command;
diff --git a/lib/zclient.h b/lib/zclient.h
index 53c7038c8..5daae3f5b 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -323,11 +323,11 @@ struct zclient {
struct buffer *wb;
/* Read and connect thread. */
- struct thread *t_read;
- struct thread *t_connect;
+ struct event *t_read;
+ struct event *t_connect;
/* Thread to write buffered data to zebra. */
- struct thread *t_write;
+ struct event *t_write;
/* Redistribute information. */
uint8_t redist_default; /* clients protocol */
diff --git a/lib/zlog.c b/lib/zlog.c
index d379ff8d3..618325d09 100644
--- a/lib/zlog.c
+++ b/lib/zlog.c
@@ -506,7 +506,7 @@ static void vzlog_tls(struct zlog_tls *zlog_tls, const struct xref_logmsg *xref,
static void zlog_backtrace_msg(const struct xref_logmsg *xref, int prio)
{
- struct thread *tc = pthread_getspecific(thread_current);
+ struct event *tc = pthread_getspecific(thread_current);
const char *uid = xref->xref.xrefdata->uid;
bool found_thread = false;
diff --git a/lib/zlog_5424.c b/lib/zlog_5424.c
index 23cad0034..14b6396b8 100644
--- a/lib/zlog_5424.c
+++ b/lib/zlog_5424.c
@@ -789,7 +789,7 @@ static void zlog_5424_cycle(struct zlog_cfg_5424 *zcf, int fd)
rcu_free(MTYPE_LOG_5424, oldt, zt.rcu_head);
}
-static void zlog_5424_reconnect(struct thread *t)
+static void zlog_5424_reconnect(struct event *t)
{
struct zlog_cfg_5424 *zcf = THREAD_ARG(t);
int fd = THREAD_FD(t);
diff --git a/lib/zlog_5424.h b/lib/zlog_5424.h
index 377e7be22..e8a15bd49 100644
--- a/lib/zlog_5424.h
+++ b/lib/zlog_5424.h
@@ -13,7 +13,7 @@
#include "zlog_targets.h"
#include "qobj.h"
-struct thread;
+struct event;
struct thread_master;
enum zlog_5424_dst {
@@ -79,7 +79,7 @@ struct zlog_cfg_5424 {
/* sockets only - read handler to reconnect on errors */
struct thread_master *master;
- struct thread *t_reconnect;
+ struct event *t_reconnect;
unsigned int reconn_backoff, reconn_backoff_cur, reconn_backoff_max;
int sock_type;
struct sockaddr_storage sa;
diff --git a/mgmtd/mgmt_be_adapter.c b/mgmtd/mgmt_be_adapter.c
index 22c0c4c04..c1a9fadb4 100644
--- a/mgmtd/mgmt_be_adapter.c
+++ b/mgmtd/mgmt_be_adapter.c
@@ -614,7 +614,7 @@ static void mgmt_be_adapter_process_msg(void *user_ctx, uint8_t *data,
mgmtd__be_message__free_unpacked(be_msg, NULL);
}
-static void mgmt_be_adapter_proc_msgbufs(struct thread *thread)
+static void mgmt_be_adapter_proc_msgbufs(struct event *thread)
{
struct mgmt_be_client_adapter *adapter = THREAD_ARG(thread);
@@ -623,7 +623,7 @@ static void mgmt_be_adapter_proc_msgbufs(struct thread *thread)
mgmt_be_adapter_register_event(adapter, MGMTD_BE_PROC_MSG);
}
-static void mgmt_be_adapter_read(struct thread *thread)
+static void mgmt_be_adapter_read(struct event *thread)
{
struct mgmt_be_client_adapter *adapter;
enum mgmt_msg_rsched rv;
@@ -640,7 +640,7 @@ static void mgmt_be_adapter_read(struct thread *thread)
mgmt_be_adapter_register_event(adapter, MGMTD_BE_CONN_READ);
}
-static void mgmt_be_adapter_write(struct thread *thread)
+static void mgmt_be_adapter_write(struct event *thread)
{
struct mgmt_be_client_adapter *adapter = THREAD_ARG(thread);
enum mgmt_msg_wsched rv;
@@ -658,7 +658,7 @@ static void mgmt_be_adapter_write(struct thread *thread)
assert(rv == MSW_SCHED_NONE);
}
-static void mgmt_be_adapter_resume_writes(struct thread *thread)
+static void mgmt_be_adapter_resume_writes(struct event *thread)
{
struct mgmt_be_client_adapter *adapter;
@@ -695,7 +695,7 @@ static void mgmt_be_iter_and_get_cfg(struct mgmt_ds_ctx *ds_ctx,
nb_config_diff_created(node, seq, root);
}
-static void mgmt_be_adapter_conn_init(struct thread *thread)
+static void mgmt_be_adapter_conn_init(struct event *thread)
{
struct mgmt_be_client_adapter *adapter;
diff --git a/mgmtd/mgmt_be_adapter.h b/mgmtd/mgmt_be_adapter.h
index 7f57233d3..6c34e5066 100644
--- a/mgmtd/mgmt_be_adapter.h
+++ b/mgmtd/mgmt_be_adapter.h
@@ -44,11 +44,11 @@ struct mgmt_be_client_adapter {
enum mgmt_be_client_id id;
int conn_fd;
union sockunion conn_su;
- struct thread *conn_init_ev;
- struct thread *conn_read_ev;
- struct thread *conn_write_ev;
- struct thread *conn_writes_on;
- struct thread *proc_msg_ev;
+ struct event *conn_init_ev;
+ struct event *conn_read_ev;
+ struct event *conn_write_ev;
+ struct event *conn_writes_on;
+ struct event *proc_msg_ev;
uint32_t flags;
char name[MGMTD_CLIENT_NAME_MAX_LEN];
uint8_t num_xpath_reg;
diff --git a/mgmtd/mgmt_be_server.c b/mgmtd/mgmt_be_server.c
index 6997fdcf8..1fcc6bd6a 100644
--- a/mgmtd/mgmt_be_server.c
+++ b/mgmtd/mgmt_be_server.c
@@ -30,10 +30,10 @@
static int mgmt_be_listen_fd = -1;
static struct thread_master *mgmt_be_listen_tm;
-static struct thread *mgmt_be_listen_ev;
+static struct event *mgmt_be_listen_ev;
static void mgmt_be_server_register_event(enum mgmt_be_event event);
-static void mgmt_be_conn_accept(struct thread *thread)
+static void mgmt_be_conn_accept(struct event *thread)
{
int client_conn_fd;
union sockunion su;
diff --git a/mgmtd/mgmt_fe_adapter.c b/mgmtd/mgmt_fe_adapter.c
index 6b4f09d9b..eaa50367c 100644
--- a/mgmtd/mgmt_fe_adapter.c
+++ b/mgmtd/mgmt_fe_adapter.c
@@ -51,8 +51,8 @@ struct mgmt_fe_session_ctx {
uint8_t ds_write_locked[MGMTD_DS_MAX_ID];
uint8_t ds_read_locked[MGMTD_DS_MAX_ID];
uint8_t ds_locked_implict[MGMTD_DS_MAX_ID];
- struct thread *proc_cfg_txn_clnp;
- struct thread *proc_show_txn_clnp;
+ struct event *proc_cfg_txn_clnp;
+ struct event *proc_show_txn_clnp;
struct mgmt_fe_sessions_item list_linkage;
};
@@ -629,7 +629,7 @@ static int mgmt_fe_send_getdata_reply(struct mgmt_fe_session_ctx *session,
return mgmt_fe_adapter_send_msg(session->adapter, &fe_msg);
}
-static void mgmt_fe_session_cfg_txn_clnup(struct thread *thread)
+static void mgmt_fe_session_cfg_txn_clnup(struct event *thread)
{
struct mgmt_fe_session_ctx *session;
@@ -638,7 +638,7 @@ static void mgmt_fe_session_cfg_txn_clnup(struct thread *thread)
mgmt_fe_session_cfg_txn_cleanup(session);
}
-static void mgmt_fe_session_show_txn_clnup(struct thread *thread)
+static void mgmt_fe_session_show_txn_clnup(struct event *thread)
{
struct mgmt_fe_session_ctx *session;
@@ -1435,7 +1435,7 @@ static void mgmt_fe_adapter_process_msg(void *user_ctx, uint8_t *data,
mgmtd__fe_message__free_unpacked(fe_msg, NULL);
}
-static void mgmt_fe_adapter_proc_msgbufs(struct thread *thread)
+static void mgmt_fe_adapter_proc_msgbufs(struct event *thread)
{
struct mgmt_fe_client_adapter *adapter = THREAD_ARG(thread);
@@ -1444,7 +1444,7 @@ static void mgmt_fe_adapter_proc_msgbufs(struct thread *thread)
mgmt_fe_adapter_register_event(adapter, MGMTD_FE_PROC_MSG);
}
-static void mgmt_fe_adapter_read(struct thread *thread)
+static void mgmt_fe_adapter_read(struct event *thread)
{
struct mgmt_fe_client_adapter *adapter = THREAD_ARG(thread);
enum mgmt_msg_rsched rv;
@@ -1459,7 +1459,7 @@ static void mgmt_fe_adapter_read(struct thread *thread)
mgmt_fe_adapter_register_event(adapter, MGMTD_FE_CONN_READ);
}
-static void mgmt_fe_adapter_write(struct thread *thread)
+static void mgmt_fe_adapter_write(struct event *thread)
{
struct mgmt_fe_client_adapter *adapter = THREAD_ARG(thread);
enum mgmt_msg_wsched rv;
@@ -1477,7 +1477,7 @@ static void mgmt_fe_adapter_write(struct thread *thread)
assert(rv == MSW_SCHED_NONE);
}
-static void mgmt_fe_adapter_resume_writes(struct thread *thread)
+static void mgmt_fe_adapter_resume_writes(struct event *thread)
{
struct mgmt_fe_client_adapter *adapter;
diff --git a/mgmtd/mgmt_fe_adapter.h b/mgmtd/mgmt_fe_adapter.h
index 3389234a3..342b766f2 100644
--- a/mgmtd/mgmt_fe_adapter.h
+++ b/mgmtd/mgmt_fe_adapter.h
@@ -56,10 +56,10 @@ PREDECL_LIST(mgmt_fe_adapters);
struct mgmt_fe_client_adapter {
int conn_fd;
union sockunion conn_su;
- struct thread *conn_read_ev;
- struct thread *conn_write_ev;
- struct thread *conn_writes_on;
- struct thread *proc_msg_ev;
+ struct event *conn_read_ev;
+ struct event *conn_write_ev;
+ struct event *conn_writes_on;
+ struct event *proc_msg_ev;
uint32_t flags;
char name[MGMTD_CLIENT_NAME_MAX_LEN];
diff --git a/mgmtd/mgmt_fe_server.c b/mgmtd/mgmt_fe_server.c
index 0b0a56ea6..6996070fa 100644
--- a/mgmtd/mgmt_fe_server.c
+++ b/mgmtd/mgmt_fe_server.c
@@ -30,10 +30,10 @@
static int mgmt_fe_listen_fd = -1;
static struct thread_master *mgmt_fe_listen_tm;
-static struct thread *mgmt_fe_listen_ev;
+static struct event *mgmt_fe_listen_ev;
static void mgmt_fe_server_register_event(enum mgmt_fe_event event);
-static void mgmt_fe_conn_accept(struct thread *thread)
+static void mgmt_fe_conn_accept(struct event *thread)
{
int client_conn_fd;
union sockunion su;
diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c
index 7ae720bc5..bbc210614 100644
--- a/mgmtd/mgmt_txn.c
+++ b/mgmtd/mgmt_txn.c
@@ -215,12 +215,12 @@ struct mgmt_txn_ctx {
/* struct mgmt_master *mm; */
- struct thread *proc_set_cfg;
- struct thread *proc_comm_cfg;
- struct thread *proc_get_cfg;
- struct thread *proc_get_data;
- struct thread *comm_cfg_timeout;
- struct thread *clnup;
+ struct event *proc_set_cfg;
+ struct event *proc_comm_cfg;
+ struct event *proc_get_cfg;
+ struct event *proc_get_data;
+ struct event *comm_cfg_timeout;
+ struct event *clnup;
/* List of backend adapters involved in this transaction */
struct mgmt_txn_badapters_head be_adapters;
@@ -615,7 +615,7 @@ static void mgmt_txn_req_free(struct mgmt_txn_req **txn_req)
*txn_req = NULL;
}
-static void mgmt_txn_process_set_cfg(struct thread *thread)
+static void mgmt_txn_process_set_cfg(struct event *thread)
{
struct mgmt_txn_ctx *txn;
struct mgmt_txn_req *txn_req;
@@ -1454,7 +1454,7 @@ mgmt_txn_send_be_txn_delete(struct mgmt_txn_ctx *txn,
return 0;
}
-static void mgmt_txn_cfg_commit_timedout(struct thread *thread)
+static void mgmt_txn_cfg_commit_timedout(struct event *thread)
{
struct mgmt_txn_ctx *txn;
@@ -1544,7 +1544,7 @@ static int mgmt_txn_send_be_cfg_apply(struct mgmt_txn_ctx *txn)
return 0;
}
-static void mgmt_txn_process_commit_cfg(struct thread *thread)
+static void mgmt_txn_process_commit_cfg(struct event *thread)
{
struct mgmt_txn_ctx *txn;
struct mgmt_commit_cfg_req *cmtcfg_req;
@@ -1874,7 +1874,7 @@ mgmt_txn_get_config_failed:
return 0;
}
-static void mgmt_txn_process_get_cfg(struct thread *thread)
+static void mgmt_txn_process_get_cfg(struct event *thread)
{
struct mgmt_txn_ctx *txn;
struct mgmt_txn_req *txn_req;
@@ -1941,7 +1941,7 @@ static void mgmt_txn_process_get_cfg(struct thread *thread)
}
}
-static void mgmt_txn_process_get_data(struct thread *thread)
+static void mgmt_txn_process_get_data(struct event *thread)
{
struct mgmt_txn_ctx *txn;
struct mgmt_txn_req *txn_req;
@@ -2206,7 +2206,7 @@ mgmt_txn_cleanup_all_txns(void)
mgmt_txn_cleanup_txn(&txn);
}
-static void mgmt_txn_cleanup(struct thread *thread)
+static void mgmt_txn_cleanup(struct event *thread)
{
struct mgmt_txn_ctx *txn;
diff --git a/nhrpd/netlink_arp.c b/nhrpd/netlink_arp.c
index 552730d12..485aae742 100644
--- a/nhrpd/netlink_arp.c
+++ b/nhrpd/netlink_arp.c
@@ -23,7 +23,7 @@
int netlink_nflog_group;
static int netlink_log_fd = -1;
-static struct thread *netlink_log_thread;
+static struct event *netlink_log_thread;
void netlink_update_binding(struct interface *ifp, union sockunion *proto,
union sockunion *nbma)
@@ -96,7 +96,7 @@ static void netlink_log_indication(struct nlmsghdr *msg, struct zbuf *zb)
nhrp_peer_send_indication(ifp, htons(pkthdr->hw_protocol), &pktpl);
}
-static void netlink_log_recv(struct thread *t)
+static void netlink_log_recv(struct event *t)
{
uint8_t buf[ZNL_BUFFER_SIZE];
int fd = THREAD_FD(t);
diff --git a/nhrpd/nhrp_cache.c b/nhrpd/nhrp_cache.c
index ac1c8f9eb..cb50dd52d 100644
--- a/nhrpd/nhrp_cache.c
+++ b/nhrpd/nhrp_cache.c
@@ -195,7 +195,7 @@ struct nhrp_cache *nhrp_cache_get(struct interface *ifp,
create ? nhrp_cache_alloc : NULL);
}
-static void nhrp_cache_do_free(struct thread *t)
+static void nhrp_cache_do_free(struct event *t)
{
struct nhrp_cache *c = THREAD_ARG(t);
@@ -203,7 +203,7 @@ static void nhrp_cache_do_free(struct thread *t)
nhrp_cache_free(c);
}
-static void nhrp_cache_do_timeout(struct thread *t)
+static void nhrp_cache_do_timeout(struct event *t)
{
struct nhrp_cache *c = THREAD_ARG(t);
@@ -395,7 +395,7 @@ static void nhrp_cache_authorize_binding(struct nhrp_reqid *r, void *arg)
nhrp_cache_update_timers(c);
}
-static void nhrp_cache_do_auth_timeout(struct thread *t)
+static void nhrp_cache_do_auth_timeout(struct event *t)
{
struct nhrp_cache *c = THREAD_ARG(t);
c->t_auth = NULL;
diff --git a/nhrpd/nhrp_event.c b/nhrpd/nhrp_event.c
index 25f5a701b..ad98da9ba 100644
--- a/nhrpd/nhrp_event.c
+++ b/nhrpd/nhrp_event.c
@@ -20,14 +20,14 @@ const char *nhrp_event_socket_path;
struct nhrp_reqid_pool nhrp_event_reqid;
struct event_manager {
- struct thread *t_reconnect, *t_read, *t_write;
+ struct event *t_reconnect, *t_read, *t_write;
struct zbuf ibuf;
struct zbuf_queue obuf;
int fd;
uint8_t ibuf_data[4 * 1024];
};
-static void evmgr_reconnect(struct thread *t);
+static void evmgr_reconnect(struct event *t);
static void evmgr_connection_error(struct event_manager *evmgr)
{
@@ -74,7 +74,7 @@ static void evmgr_recv_message(struct event_manager *evmgr, struct zbuf *zb)
}
}
-static void evmgr_read(struct thread *t)
+static void evmgr_read(struct event *t)
{
struct event_manager *evmgr = THREAD_ARG(t);
struct zbuf *ibuf = &evmgr->ibuf;
@@ -92,7 +92,7 @@ static void evmgr_read(struct thread *t)
thread_add_read(master, evmgr_read, evmgr, evmgr->fd, &evmgr->t_read);
}
-static void evmgr_write(struct thread *t)
+static void evmgr_write(struct event *t)
{
struct event_manager *evmgr = THREAD_ARG(t);
int r;
@@ -179,7 +179,7 @@ static void evmgr_submit(struct event_manager *evmgr, struct zbuf *obuf)
&evmgr->t_write);
}
-static void evmgr_reconnect(struct thread *t)
+static void evmgr_reconnect(struct event *t)
{
struct event_manager *evmgr = THREAD_ARG(t);
int fd;
diff --git a/nhrpd/nhrp_multicast.c b/nhrpd/nhrp_multicast.c
index e37dfb5d8..db85d550c 100644
--- a/nhrpd/nhrp_multicast.c
+++ b/nhrpd/nhrp_multicast.c
@@ -28,7 +28,7 @@ DEFINE_MTYPE_STATIC(NHRPD, NHRP_MULTICAST, "NHRP Multicast");
int netlink_mcast_nflog_group;
static int netlink_mcast_log_fd = -1;
-static struct thread *netlink_mcast_log_thread;
+static struct event *netlink_mcast_log_thread;
struct mcast_ctx {
struct interface *ifp;
@@ -138,7 +138,7 @@ static void netlink_mcast_log_handler(struct nlmsghdr *msg, struct zbuf *zb)
}
}
-static void netlink_mcast_log_recv(struct thread *t)
+static void netlink_mcast_log_recv(struct event *t)
{
uint8_t buf[65535]; /* Max OSPF Packet size */
int fd = THREAD_FD(t);
diff --git a/nhrpd/nhrp_nhs.c b/nhrpd/nhrp_nhs.c
index 358d1b94c..c6a6b8e75 100644
--- a/nhrpd/nhrp_nhs.c
+++ b/nhrpd/nhrp_nhs.c
@@ -13,8 +13,8 @@
DEFINE_MTYPE_STATIC(NHRPD, NHRP_NHS, "NHRP next hop server");
DEFINE_MTYPE_STATIC(NHRPD, NHRP_REGISTRATION, "NHRP registration entries");
-static void nhrp_nhs_resolve(struct thread *t);
-static void nhrp_reg_send_req(struct thread *t);
+static void nhrp_nhs_resolve(struct event *t);
+static void nhrp_reg_send_req(struct event *t);
static void nhrp_reg_reply(struct nhrp_reqid *reqid, void *arg)
{
@@ -103,7 +103,7 @@ static void nhrp_reg_reply(struct nhrp_reqid *reqid, void *arg)
&cie_nbma_nhs);
}
-static void nhrp_reg_timeout(struct thread *t)
+static void nhrp_reg_timeout(struct event *t)
{
struct nhrp_registration *r = THREAD_ARG(t);
struct nhrp_cache *c;
@@ -155,7 +155,7 @@ static void nhrp_reg_peer_notify(struct notifier_block *n, unsigned long cmd)
}
}
-static void nhrp_reg_send_req(struct thread *t)
+static void nhrp_reg_send_req(struct event *t)
{
struct nhrp_registration *r = THREAD_ARG(t);
struct nhrp_nhs *nhs = r->nhs;
@@ -309,7 +309,7 @@ static void nhrp_nhs_resolve_cb(struct resolver_query *q, const char *errstr,
nhrp_reg_delete(reg);
}
-static void nhrp_nhs_resolve(struct thread *t)
+static void nhrp_nhs_resolve(struct event *t)
{
struct nhrp_nhs *nhs = THREAD_ARG(t);
diff --git a/nhrpd/nhrp_packet.c b/nhrpd/nhrp_packet.c
index d201eb6cc..650b3ab87 100644
--- a/nhrpd/nhrp_packet.c
+++ b/nhrpd/nhrp_packet.c
@@ -286,7 +286,7 @@ err:
return -1;
}
-static void nhrp_packet_recvraw(struct thread *t)
+static void nhrp_packet_recvraw(struct event *t)
{
int fd = THREAD_FD(t), ifindex;
struct zbuf *zb;
diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c
index 25ce59a40..95694a41f 100644
--- a/nhrpd/nhrp_peer.c
+++ b/nhrpd/nhrp_peer.c
@@ -51,7 +51,7 @@ static void nhrp_peer_check_delete(struct nhrp_peer *p)
XFREE(MTYPE_NHRP_PEER, p);
}
-static void nhrp_peer_notify_up(struct thread *t)
+static void nhrp_peer_notify_up(struct event *t)
{
struct nhrp_peer *p = THREAD_ARG(t);
struct nhrp_vc *vc = p->vc;
@@ -248,7 +248,7 @@ void nhrp_peer_unref(struct nhrp_peer *p)
}
}
-static void nhrp_peer_request_timeout(struct thread *t)
+static void nhrp_peer_request_timeout(struct event *t)
{
struct nhrp_peer *p = THREAD_ARG(t);
struct nhrp_vc *vc = p->vc;
@@ -271,7 +271,7 @@ static void nhrp_peer_request_timeout(struct thread *t)
}
}
-static void nhrp_peer_defer_vici_request(struct thread *t)
+static void nhrp_peer_defer_vici_request(struct event *t)
{
struct nhrp_peer *p = THREAD_ARG(t);
struct nhrp_vc *vc = p->vc;
diff --git a/nhrpd/nhrp_shortcut.c b/nhrpd/nhrp_shortcut.c
index e5516ba72..b1e2b7cea 100644
--- a/nhrpd/nhrp_shortcut.c
+++ b/nhrpd/nhrp_shortcut.c
@@ -18,7 +18,7 @@ DEFINE_MTYPE_STATIC(NHRPD, NHRP_SHORTCUT, "NHRP shortcut");
static struct route_table *shortcut_rib[AFI_MAX];
-static void nhrp_shortcut_do_purge(struct thread *t);
+static void nhrp_shortcut_do_purge(struct event *t);
static void nhrp_shortcut_delete(struct nhrp_shortcut *s);
static void nhrp_shortcut_send_resolution_req(struct nhrp_shortcut *s);
@@ -31,7 +31,7 @@ static void nhrp_shortcut_check_use(struct nhrp_shortcut *s)
}
}
-static void nhrp_shortcut_do_expire(struct thread *t)
+static void nhrp_shortcut_do_expire(struct event *t)
{
struct nhrp_shortcut *s = THREAD_ARG(t);
@@ -154,7 +154,7 @@ static void nhrp_shortcut_delete(struct nhrp_shortcut *s)
}
}
-static void nhrp_shortcut_do_purge(struct thread *t)
+static void nhrp_shortcut_do_purge(struct event *t)
{
struct nhrp_shortcut *s = THREAD_ARG(t);
s->t_timer = NULL;
diff --git a/nhrpd/nhrpd.h b/nhrpd/nhrpd.h
index c01296bee..942822271 100644
--- a/nhrpd/nhrpd.h
+++ b/nhrpd/nhrpd.h
@@ -166,9 +166,9 @@ struct nhrp_peer {
struct notifier_list notifier_list;
struct interface *ifp;
struct nhrp_vc *vc;
- struct thread *t_fallback;
+ struct event *t_fallback;
struct notifier_block vc_notifier, ifp_notifier;
- struct thread *t_timer;
+ struct event *t_timer;
};
struct nhrp_packet_parser {
@@ -232,8 +232,8 @@ struct nhrp_cache {
struct notifier_block newpeer_notifier;
struct notifier_list notifier_list;
struct nhrp_reqid eventid;
- struct thread *t_timeout;
- struct thread *t_auth;
+ struct event *t_timeout;
+ struct event *t_auth;
struct {
enum nhrp_cache_type type;
@@ -251,7 +251,7 @@ struct nhrp_shortcut {
union sockunion addr;
struct nhrp_reqid reqid;
- struct thread *t_timer;
+ struct event *t_timer;
enum nhrp_cache_type type;
unsigned int holding_time;
@@ -275,7 +275,7 @@ struct nhrp_nhs {
union sockunion proto_addr;
const char *nbma_fqdn; /* IP-address or FQDN */
- struct thread *t_resolve;
+ struct event *t_resolve;
struct resolver_query dns_resolve;
struct nhrp_reglist_head reglist_head;
};
@@ -293,7 +293,7 @@ DECLARE_DLIST(nhrp_mcastlist, struct nhrp_multicast, mcastlist_entry);
struct nhrp_registration {
struct nhrp_reglist_item reglist_entry;
- struct thread *t_register;
+ struct event *t_register;
struct nhrp_nhs *nhs;
struct nhrp_reqid reqid;
unsigned int timeout;
diff --git a/nhrpd/vici.c b/nhrpd/vici.c
index 880e0c253..02e36d2e6 100644
--- a/nhrpd/vici.c
+++ b/nhrpd/vici.c
@@ -44,7 +44,7 @@ static int blob2buf(const struct blob *b, char *buf, size_t n)
}
struct vici_conn {
- struct thread *t_reconnect, *t_read, *t_write;
+ struct event *t_reconnect, *t_read, *t_write;
struct zbuf ibuf;
struct zbuf_queue obuf;
int fd;
@@ -56,7 +56,7 @@ struct vici_message_ctx {
int nsections;
};
-static void vici_reconnect(struct thread *t);
+static void vici_reconnect(struct event *t);
static void vici_submit_request(struct vici_conn *vici, const char *name, ...);
static void vici_zbuf_puts(struct zbuf *obuf, const char *str)
@@ -357,7 +357,7 @@ static void vici_recv_message(struct vici_conn *vici, struct zbuf *msg)
}
}
-static void vici_read(struct thread *t)
+static void vici_read(struct event *t)
{
struct vici_conn *vici = THREAD_ARG(t);
struct zbuf *ibuf = &vici->ibuf;
@@ -387,7 +387,7 @@ static void vici_read(struct thread *t)
thread_add_read(master, vici_read, vici, vici->fd, &vici->t_read);
}
-static void vici_write(struct thread *t)
+static void vici_write(struct event *t)
{
struct vici_conn *vici = THREAD_ARG(t);
int r;
@@ -500,7 +500,7 @@ static char *vici_get_charon_filepath(void)
return buff;
}
-static void vici_reconnect(struct thread *t)
+static void vici_reconnect(struct event *t)
{
struct vici_conn *vici = THREAD_ARG(t);
int fd;
diff --git a/ospf6d/ospf6_area.h b/ospf6d/ospf6_area.h
index 62b32d376..d9afd65d8 100644
--- a/ospf6d/ospf6_area.h
+++ b/ospf6d/ospf6_area.h
@@ -60,8 +60,8 @@ struct ospf6_area {
uint32_t spf_calculation; /* SPF calculation count */
- struct thread *thread_router_lsa;
- struct thread *thread_intra_prefix_lsa;
+ struct event *thread_router_lsa;
+ struct event *thread_intra_prefix_lsa;
uint32_t router_lsa_size_limit;
/* Area announce list */
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 8924c00a5..a2e77d922 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -180,7 +180,7 @@ struct ospf6_lsa *ospf6_as_external_lsa_originate(struct ospf6_route *route,
return lsa;
}
-void ospf6_orig_as_external_lsa(struct thread *thread)
+void ospf6_orig_as_external_lsa(struct event *thread)
{
struct ospf6_interface *oi;
struct ospf6_lsa *lsa;
@@ -1065,7 +1065,7 @@ static void ospf6_asbr_routemap_unset(struct ospf6_redist *red)
ROUTEMAP(red) = NULL;
}
-static void ospf6_asbr_routemap_update_timer(struct thread *thread)
+static void ospf6_asbr_routemap_update_timer(struct event *thread)
{
struct ospf6 *ospf6 = THREAD_ARG(thread);
struct ospf6_redist *red;
@@ -3332,7 +3332,7 @@ ospf6_handle_external_aggr_add(struct ospf6 *ospf6)
}
}
-static void ospf6_asbr_summary_process(struct thread *thread)
+static void ospf6_asbr_summary_process(struct event *thread)
{
struct ospf6 *ospf6 = THREAD_ARG(thread);
int operation = 0;
diff --git a/ospf6d/ospf6_gr.c b/ospf6d/ospf6_gr.c
index 847531361..b3f485915 100644
--- a/ospf6d/ospf6_gr.c
+++ b/ospf6d/ospf6_gr.c
@@ -459,7 +459,7 @@ static bool ospf6_gr_check_adjs(struct ospf6 *ospf6)
}
/* Handling of grace period expiry. */
-static void ospf6_gr_grace_period_expired(struct thread *thread)
+static void ospf6_gr_grace_period_expired(struct event *thread)
{
struct ospf6 *ospf6 = THREAD_ARG(thread);
diff --git a/ospf6d/ospf6_gr_helper.c b/ospf6d/ospf6_gr_helper.c
index 3df0580fc..fb710cc1c 100644
--- a/ospf6d/ospf6_gr_helper.c
+++ b/ospf6d/ospf6_gr_helper.c
@@ -195,7 +195,7 @@ static int ospf6_extract_grace_lsa_fields(struct ospf6_lsa *lsa,
* Returns:
* Nothing
*/
-static void ospf6_handle_grace_timer_expiry(struct thread *thread)
+static void ospf6_handle_grace_timer_expiry(struct event *thread)
{
struct ospf6_neighbor *nbr = THREAD_ARG(thread);
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 5f0c3cf93..f465d8763 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -720,7 +720,7 @@ static bool ifmaddr_check(ifindex_t ifindex, struct in6_addr *addr)
#endif /* __FreeBSD__ */
/* Interface State Machine */
-void interface_up(struct thread *thread)
+void interface_up(struct event *thread)
{
struct ospf6_interface *oi;
struct ospf6 *ospf6;
@@ -834,7 +834,7 @@ void interface_up(struct thread *thread)
}
}
-void wait_timer(struct thread *thread)
+void wait_timer(struct event *thread)
{
struct ospf6_interface *oi;
@@ -849,7 +849,7 @@ void wait_timer(struct thread *thread)
ospf6_interface_state_change(dr_election(oi), oi);
}
-void backup_seen(struct thread *thread)
+void backup_seen(struct event *thread)
{
struct ospf6_interface *oi;
@@ -864,7 +864,7 @@ void backup_seen(struct thread *thread)
ospf6_interface_state_change(dr_election(oi), oi);
}
-void neighbor_change(struct thread *thread)
+void neighbor_change(struct event *thread)
{
struct ospf6_interface *oi;
@@ -881,7 +881,7 @@ void neighbor_change(struct thread *thread)
ospf6_interface_state_change(dr_election(oi), oi);
}
-void interface_down(struct thread *thread)
+void interface_down(struct event *thread)
{
struct ospf6_interface *oi;
struct listnode *node, *nnode;
diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h
index e04842a7c..ae0744b25 100644
--- a/ospf6d/ospf6_interface.h
+++ b/ospf6d/ospf6_interface.h
@@ -90,7 +90,7 @@ struct ospf6_interface {
/* Interface socket setting trial counter, resets on success */
uint8_t sso_try_cnt;
- struct thread *thread_sso;
+ struct event *thread_sso;
/* OSPF6 Interface flag */
char flag;
@@ -115,15 +115,15 @@ struct ospf6_interface {
struct ospf6_lsdb *lsack_list;
/* Ongoing Tasks */
- struct thread *thread_send_hello;
- struct thread *thread_send_lsupdate;
- struct thread *thread_send_lsack;
+ struct event *thread_send_hello;
+ struct event *thread_send_lsupdate;
+ struct event *thread_send_lsack;
- struct thread *thread_network_lsa;
- struct thread *thread_link_lsa;
- struct thread *thread_intra_prefix_lsa;
- struct thread *thread_as_extern_lsa;
- struct thread *thread_wait_timer;
+ struct event *thread_network_lsa;
+ struct event *thread_link_lsa;
+ struct event *thread_intra_prefix_lsa;
+ struct event *thread_as_extern_lsa;
+ struct event *thread_wait_timer;
struct ospf6_route_table *route_connected;
@@ -211,11 +211,11 @@ extern struct in6_addr *
ospf6_interface_get_global_address(struct interface *ifp);
/* interface event */
-extern void interface_up(struct thread *thread);
-extern void interface_down(struct thread *thread);
-extern void wait_timer(struct thread *thread);
-extern void backup_seen(struct thread *thread);
-extern void neighbor_change(struct thread *thread);
+extern void interface_up(struct event *thread);
+extern void interface_down(struct event *thread);
+extern void wait_timer(struct event *thread);
+extern void backup_seen(struct event *thread);
+extern void neighbor_change(struct event *thread);
extern void ospf6_interface_init(void);
extern void ospf6_interface_clear(struct interface *ifp);
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index d57e56bb3..821ace89e 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -209,7 +209,7 @@ int ospf6_router_is_stub_router(struct ospf6_lsa *lsa)
return OSPF6_NOT_STUB_ROUTER;
}
-void ospf6_router_lsa_originate(struct thread *thread)
+void ospf6_router_lsa_originate(struct event *thread)
{
struct ospf6_area *oa;
@@ -494,7 +494,7 @@ static int ospf6_network_lsa_show(struct vty *vty, struct ospf6_lsa *lsa,
return 0;
}
-void ospf6_network_lsa_originate(struct thread *thread)
+void ospf6_network_lsa_originate(struct event *thread)
{
struct ospf6_interface *oi;
@@ -746,7 +746,7 @@ static int ospf6_link_lsa_show(struct vty *vty, struct ospf6_lsa *lsa,
return 0;
}
-void ospf6_link_lsa_originate(struct thread *thread)
+void ospf6_link_lsa_originate(struct event *thread)
{
struct ospf6_interface *oi;
@@ -982,7 +982,7 @@ static int ospf6_intra_prefix_lsa_show(struct vty *vty, struct ospf6_lsa *lsa,
return 0;
}
-void ospf6_intra_prefix_lsa_originate_stub(struct thread *thread)
+void ospf6_intra_prefix_lsa_originate_stub(struct event *thread)
{
struct ospf6_area *oa;
@@ -1217,7 +1217,7 @@ void ospf6_intra_prefix_lsa_originate_stub(struct thread *thread)
}
-void ospf6_intra_prefix_lsa_originate_transit(struct thread *thread)
+void ospf6_intra_prefix_lsa_originate_transit(struct event *thread)
{
struct ospf6_interface *oi;
diff --git a/ospf6d/ospf6_intra.h b/ospf6d/ospf6_intra.h
index 79b5eb0ed..f4b392f46 100644
--- a/ospf6d/ospf6_intra.h
+++ b/ospf6d/ospf6_intra.h
@@ -220,14 +220,14 @@ extern char *ospf6_network_lsdesc_lookup(uint32_t router_id,
struct ospf6_lsa *lsa);
extern int ospf6_router_is_stub_router(struct ospf6_lsa *lsa);
-extern void ospf6_router_lsa_originate(struct thread *thread);
-extern void ospf6_network_lsa_originate(struct thread *thread);
-extern void ospf6_link_lsa_originate(struct thread *thread);
-extern void ospf6_intra_prefix_lsa_originate_transit(struct thread *thread);
-extern void ospf6_intra_prefix_lsa_originate_stub(struct thread *thread);
+extern void ospf6_router_lsa_originate(struct event *thread);
+extern void ospf6_network_lsa_originate(struct event *thread);
+extern void ospf6_link_lsa_originate(struct event *thread);
+extern void ospf6_intra_prefix_lsa_originate_transit(struct event *thread);
+extern void ospf6_intra_prefix_lsa_originate_stub(struct event *thread);
extern void ospf6_intra_prefix_lsa_add(struct ospf6_lsa *lsa);
extern void ospf6_intra_prefix_lsa_remove(struct ospf6_lsa *lsa);
-extern void ospf6_orig_as_external_lsa(struct thread *thread);
+extern void ospf6_orig_as_external_lsa(struct event *thread);
extern void ospf6_intra_route_calculation(struct ospf6_area *oa);
extern void ospf6_intra_brouter_calculation(struct ospf6_area *oa);
extern void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c
index d93115adc..508cb6f5e 100644
--- a/ospf6d/ospf6_lsa.c
+++ b/ospf6d/ospf6_lsa.c
@@ -812,7 +812,7 @@ struct ospf6_lsa *ospf6_lsa_unlock(struct ospf6_lsa *lsa)
/* ospf6 lsa expiry */
-void ospf6_lsa_expire(struct thread *thread)
+void ospf6_lsa_expire(struct event *thread)
{
struct ospf6_lsa *lsa;
struct ospf6 *ospf6;
@@ -823,7 +823,7 @@ void ospf6_lsa_expire(struct thread *thread)
assert(OSPF6_LSA_IS_MAXAGE(lsa));
assert(!lsa->refresh);
- lsa->expire = (struct thread *)NULL;
+ lsa->expire = (struct event *)NULL;
if (IS_OSPF6_DEBUG_LSA_TYPE(lsa->header->type)) {
zlog_debug("LSA Expire:");
@@ -845,7 +845,7 @@ void ospf6_lsa_expire(struct thread *thread)
ospf6_maxage_remove(ospf6);
}
-void ospf6_lsa_refresh(struct thread *thread)
+void ospf6_lsa_refresh(struct event *thread)
{
struct ospf6_lsa *old, *self, *new;
struct ospf6_lsdb *lsdb_self;
@@ -853,7 +853,7 @@ void ospf6_lsa_refresh(struct thread *thread)
old = (struct ospf6_lsa *)THREAD_ARG(thread);
assert(old && old->header);
- old->refresh = (struct thread *)NULL;
+ old->refresh = (struct event *)NULL;
lsdb_self = ospf6_get_scoped_lsdb_self(old);
self = ospf6_lsdb_lookup(old->header->type, old->header->id,
diff --git a/ospf6d/ospf6_lsa.h b/ospf6d/ospf6_lsa.h
index acb24d791..be7b94f3d 100644
--- a/ospf6d/ospf6_lsa.h
+++ b/ospf6d/ospf6_lsa.h
@@ -119,8 +119,8 @@ struct ospf6_lsa {
struct timeval received; /* used by MinLSArrival check */
struct timeval installed;
- struct thread *expire;
- struct thread *refresh; /* For self-originated LSA */
+ struct event *expire;
+ struct event *refresh; /* For self-originated LSA */
int retrans_count;
@@ -241,8 +241,8 @@ extern struct ospf6_lsa *ospf6_lsa_copy(struct ospf6_lsa *lsa);
extern struct ospf6_lsa *ospf6_lsa_lock(struct ospf6_lsa *lsa);
extern struct ospf6_lsa *ospf6_lsa_unlock(struct ospf6_lsa *lsa);
-extern void ospf6_lsa_expire(struct thread *thread);
-extern void ospf6_lsa_refresh(struct thread *thread);
+extern void ospf6_lsa_expire(struct event *thread);
+extern void ospf6_lsa_refresh(struct event *thread);
extern unsigned short ospf6_lsa_checksum(struct ospf6_lsa_header *lsah);
extern int ospf6_lsa_checksum_valid(struct ospf6_lsa_header *lsah);
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index 45d03bafe..1d3d1f7e6 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -1907,7 +1907,7 @@ static int ospf6_read_helper(int sockfd, struct ospf6 *ospf6)
return OSPF6_READ_CONTINUE;
}
-void ospf6_receive(struct thread *thread)
+void ospf6_receive(struct event *thread)
{
int sockfd;
struct ospf6 *ospf6;
@@ -2082,7 +2082,7 @@ static uint16_t ospf6_make_hello(struct ospf6_interface *oi, struct stream *s)
return length;
}
-static void ospf6_write(struct thread *thread)
+static void ospf6_write(struct event *thread)
{
struct ospf6 *ospf6 = THREAD_ARG(thread);
struct ospf6_interface *oi;
@@ -2236,7 +2236,7 @@ static void ospf6_write(struct thread *thread)
&ospf6->t_write);
}
-void ospf6_hello_send(struct thread *thread)
+void ospf6_hello_send(struct event *thread)
{
struct ospf6_interface *oi;
struct ospf6_packet *op;
@@ -2333,7 +2333,7 @@ static uint16_t ospf6_make_dbdesc(struct ospf6_neighbor *on, struct stream *s)
return length;
}
-void ospf6_dbdesc_send(struct thread *thread)
+void ospf6_dbdesc_send(struct event *thread)
{
struct ospf6_neighbor *on;
uint16_t length = OSPF6_HEADER_SIZE;
@@ -2376,7 +2376,7 @@ void ospf6_dbdesc_send(struct thread *thread)
OSPF6_MESSAGE_WRITE_ON(on->ospf6_if);
}
-void ospf6_dbdesc_send_newone(struct thread *thread)
+void ospf6_dbdesc_send_newone(struct event *thread)
{
struct ospf6_neighbor *on;
struct ospf6_lsa *lsa, *lsanext;
@@ -2498,7 +2498,7 @@ static uint16_t ospf6_make_lsack_neighbor(struct ospf6_neighbor *on,
return length;
}
-void ospf6_lsreq_send(struct thread *thread)
+void ospf6_lsreq_send(struct event *thread)
{
struct ospf6_neighbor *on;
struct ospf6_packet *op;
@@ -2676,7 +2676,7 @@ static uint16_t ospf6_make_ls_retrans_list(struct ospf6_neighbor *on,
return length;
}
-void ospf6_lsupdate_send_neighbor(struct thread *thread)
+void ospf6_lsupdate_send_neighbor(struct event *thread)
{
struct ospf6_neighbor *on;
struct ospf6_packet *op;
@@ -2811,7 +2811,7 @@ static uint16_t ospf6_make_lsupdate_interface(struct ospf6_interface *oi,
return length;
}
-void ospf6_lsupdate_send_interface(struct thread *thread)
+void ospf6_lsupdate_send_interface(struct event *thread)
{
struct ospf6_interface *oi;
struct ospf6_packet *op;
@@ -2852,7 +2852,7 @@ void ospf6_lsupdate_send_interface(struct thread *thread)
}
}
-void ospf6_lsack_send_neighbor(struct thread *thread)
+void ospf6_lsack_send_neighbor(struct event *thread)
{
struct ospf6_neighbor *on;
struct ospf6_packet *op;
@@ -2928,7 +2928,7 @@ static uint16_t ospf6_make_lsack_interface(struct ospf6_interface *oi,
return length;
}
-void ospf6_lsack_send_interface(struct thread *thread)
+void ospf6_lsack_send_interface(struct event *thread)
{
struct ospf6_interface *oi;
struct ospf6_packet *op;
diff --git a/ospf6d/ospf6_message.h b/ospf6d/ospf6_message.h
index 1f6a7e86e..2b25b0744 100644
--- a/ospf6d/ospf6_message.h
+++ b/ospf6d/ospf6_message.h
@@ -158,16 +158,16 @@ extern void ospf6_fifo_free(struct ospf6_fifo *fifo);
extern int ospf6_iobuf_size(unsigned int size);
extern void ospf6_message_terminate(void);
-extern void ospf6_receive(struct thread *thread);
-
-extern void ospf6_hello_send(struct thread *thread);
-extern void ospf6_dbdesc_send(struct thread *thread);
-extern void ospf6_dbdesc_send_newone(struct thread *thread);
-extern void ospf6_lsreq_send(struct thread *thread);
-extern void ospf6_lsupdate_send_interface(struct thread *thread);
-extern void ospf6_lsupdate_send_neighbor(struct thread *thread);
-extern void ospf6_lsack_send_interface(struct thread *thread);
-extern void ospf6_lsack_send_neighbor(struct thread *thread);
+extern void ospf6_receive(struct event *thread);
+
+extern void ospf6_hello_send(struct event *thread);
+extern void ospf6_dbdesc_send(struct event *thread);
+extern void ospf6_dbdesc_send_newone(struct event *thread);
+extern void ospf6_lsreq_send(struct event *thread);
+extern void ospf6_lsupdate_send_interface(struct event *thread);
+extern void ospf6_lsupdate_send_neighbor(struct event *thread);
+extern void ospf6_lsack_send_interface(struct event *thread);
+extern void ospf6_lsack_send_neighbor(struct event *thread);
extern int config_write_ospf6_debug_message(struct vty *);
extern void install_element_ospf6_debug_message(void);
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c
index c90603e1a..95c8f189d 100644
--- a/ospf6d/ospf6_neighbor.c
+++ b/ospf6d/ospf6_neighbor.c
@@ -272,7 +272,7 @@ static int need_adjacency(struct ospf6_neighbor *on)
return 0;
}
-void hello_received(struct thread *thread)
+void hello_received(struct event *thread)
{
struct ospf6_neighbor *on;
@@ -292,7 +292,7 @@ void hello_received(struct thread *thread)
OSPF6_NEIGHBOR_EVENT_HELLO_RCVD);
}
-void twoway_received(struct thread *thread)
+void twoway_received(struct event *thread)
{
struct ospf6_neighbor *on;
@@ -324,7 +324,7 @@ void twoway_received(struct thread *thread)
&on->thread_send_dbdesc);
}
-void negotiation_done(struct thread *thread)
+void negotiation_done(struct event *thread)
{
struct ospf6_neighbor *on;
struct ospf6_lsa *lsa, *lsanext;
@@ -373,7 +373,7 @@ void negotiation_done(struct thread *thread)
OSPF6_NEIGHBOR_EVENT_NEGOTIATION_DONE);
}
-static void ospf6_neighbor_last_dbdesc_release(struct thread *thread)
+static void ospf6_neighbor_last_dbdesc_release(struct event *thread)
{
struct ospf6_neighbor *on = THREAD_ARG(thread);
@@ -381,7 +381,7 @@ static void ospf6_neighbor_last_dbdesc_release(struct thread *thread)
memset(&on->dbdesc_last, 0, sizeof(struct ospf6_dbdesc));
}
-void exchange_done(struct thread *thread)
+void exchange_done(struct event *thread)
{
struct ospf6_neighbor *on;
@@ -437,7 +437,7 @@ void ospf6_check_nbr_loading(struct ospf6_neighbor *on)
}
}
-void loading_done(struct thread *thread)
+void loading_done(struct event *thread)
{
struct ospf6_neighbor *on;
@@ -456,7 +456,7 @@ void loading_done(struct thread *thread)
OSPF6_NEIGHBOR_EVENT_LOADING_DONE);
}
-void adj_ok(struct thread *thread)
+void adj_ok(struct event *thread)
{
struct ospf6_neighbor *on;
@@ -484,7 +484,7 @@ void adj_ok(struct thread *thread)
}
}
-void seqnumber_mismatch(struct thread *thread)
+void seqnumber_mismatch(struct event *thread)
{
struct ospf6_neighbor *on;
@@ -512,7 +512,7 @@ void seqnumber_mismatch(struct thread *thread)
&on->thread_send_dbdesc);
}
-void bad_lsreq(struct thread *thread)
+void bad_lsreq(struct event *thread)
{
struct ospf6_neighbor *on;
@@ -541,7 +541,7 @@ void bad_lsreq(struct thread *thread)
}
-void oneway_received(struct thread *thread)
+void oneway_received(struct event *thread)
{
struct ospf6_neighbor *on;
@@ -568,7 +568,7 @@ void oneway_received(struct thread *thread)
THREAD_OFF(on->thread_adj_ok);
}
-void inactivity_timer(struct thread *thread)
+void inactivity_timer(struct event *thread)
{
struct ospf6_neighbor *on;
diff --git a/ospf6d/ospf6_neighbor.h b/ospf6d/ospf6_neighbor.h
index d9abd1ff9..5ec754d3a 100644
--- a/ospf6d/ospf6_neighbor.h
+++ b/ospf6d/ospf6_neighbor.h
@@ -36,7 +36,7 @@ struct ospf6_helper_info {
* helper until this timer until
* this timer expires.
*/
- struct thread *t_grace_timer;
+ struct event *t_grace_timer;
/* Helper status */
uint32_t gr_helper_status;
@@ -111,18 +111,18 @@ struct ospf6_neighbor {
struct ospf6_lsa *last_ls_req;
/* Inactivity timer */
- struct thread *inactivity_timer;
+ struct event *inactivity_timer;
/* Timer to release the last dbdesc packet */
- struct thread *last_dbdesc_release_timer;
+ struct event *last_dbdesc_release_timer;
/* Thread for sending message */
- struct thread *thread_send_dbdesc;
- struct thread *thread_send_lsreq;
- struct thread *thread_send_lsupdate;
- struct thread *thread_send_lsack;
- struct thread *thread_exchange_done;
- struct thread *thread_adj_ok;
+ struct event *thread_send_dbdesc;
+ struct event *thread_send_lsreq;
+ struct event *thread_send_lsupdate;
+ struct event *thread_send_lsack;
+ struct event *thread_exchange_done;
+ struct event *thread_adj_ok;
/* BFD information */
struct bfd_session_params *bfd_session;
@@ -190,16 +190,16 @@ struct ospf6_neighbor *ospf6_neighbor_create(uint32_t router_id,
void ospf6_neighbor_delete(struct ospf6_neighbor *on);
/* Neighbor event */
-extern void hello_received(struct thread *thread);
-extern void twoway_received(struct thread *thread);
-extern void negotiation_done(struct thread *thread);
-extern void exchange_done(struct thread *thread);
-extern void loading_done(struct thread *thread);
-extern void adj_ok(struct thread *thread);
-extern void seqnumber_mismatch(struct thread *thread);
-extern void bad_lsreq(struct thread *thread);
-extern void oneway_received(struct thread *thread);
-extern void inactivity_timer(struct thread *thread);
+extern void hello_received(struct event *thread);
+extern void twoway_received(struct event *thread);
+extern void negotiation_done(struct event *thread);
+extern void exchange_done(struct event *thread);
+extern void loading_done(struct event *thread);
+extern void adj_ok(struct event *thread);
+extern void seqnumber_mismatch(struct event *thread);
+extern void bad_lsreq(struct event *thread);
+extern void oneway_received(struct event *thread);
+extern void inactivity_timer(struct event *thread);
extern void ospf6_check_nbr_loading(struct ospf6_neighbor *on);
extern void ospf6_neighbor_init(void);
diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c
index cd3b742de..6bae9b617 100644
--- a/ospf6d/ospf6_nssa.c
+++ b/ospf6d/ospf6_nssa.c
@@ -976,7 +976,7 @@ int ospf6_redistribute_check(struct ospf6 *ospf6, struct ospf6_route *route,
}
/* This function performs ABR related processing */
-static void ospf6_abr_task_timer(struct thread *thread)
+static void ospf6_abr_task_timer(struct event *thread)
{
struct ospf6 *ospf6 = THREAD_ARG(thread);
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
index 474cca0f3..d2366be46 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -590,7 +590,7 @@ static void ospf6_spf_log_database(struct ospf6_area *oa)
zlog_debug("%s", buffer);
}
-static void ospf6_spf_calculation_thread(struct thread *t)
+static void ospf6_spf_calculation_thread(struct event *t)
{
struct ospf6_area *oa;
struct ospf6 *ospf6;
@@ -1228,7 +1228,7 @@ int ospf6_ase_calculate_route(struct ospf6 *ospf6, struct ospf6_lsa *lsa,
return 0;
}
-static void ospf6_ase_calculate_timer(struct thread *t)
+static void ospf6_ase_calculate_timer(struct event *t)
{
struct ospf6 *ospf6;
struct ospf6_lsa *lsa;
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 029848386..ad4e58ae2 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -573,7 +573,7 @@ void ospf6_master_init(struct thread_master *master)
om6->master = master;
}
-static void ospf6_maxage_remover(struct thread *thread)
+static void ospf6_maxage_remover(struct event *thread)
{
struct ospf6 *o = (struct ospf6 *)THREAD_ARG(thread);
struct ospf6_area *oa;
diff --git a/ospf6d/ospf6_top.h b/ospf6d/ospf6_top.h
index 08595a69d..73c875124 100644
--- a/ospf6d/ospf6_top.h
+++ b/ospf6d/ospf6_top.h
@@ -51,7 +51,7 @@ struct ospf6_gr_info {
bool prepare_in_progress;
bool finishing_restart;
uint32_t grace_period;
- struct thread *t_grace_period;
+ struct event *t_grace_period;
};
struct ospf6_gr_helper {
@@ -168,14 +168,14 @@ struct ospf6 {
int fd;
/* Threads */
- struct thread *t_spf_calc; /* SPF calculation timer. */
- struct thread *t_ase_calc; /* ASE calculation timer. */
- struct thread *maxage_remover;
- struct thread *t_distribute_update; /* Distirbute update timer. */
- struct thread *t_ospf6_receive; /* OSPF6 receive timer */
- struct thread *t_external_aggr; /* OSPF6 aggregation timer */
+ struct event *t_spf_calc; /* SPF calculation timer. */
+ struct event *t_ase_calc; /* ASE calculation timer. */
+ struct event *maxage_remover;
+ struct event *t_distribute_update; /* Distirbute update timer. */
+ struct event *t_ospf6_receive; /* OSPF6 receive timer */
+ struct event *t_external_aggr; /* OSPF6 aggregation timer */
#define OSPF6_WRITE_INTERFACE_COUNT_DEFAULT 20
- struct thread *t_write;
+ struct event *t_write;
int write_oi_count; /* Num of packets sent per thread invocation */
uint32_t ref_bandwidth;
@@ -205,7 +205,7 @@ struct ospf6 {
/* Count of NSSA areas */
uint8_t anyNSSA;
- struct thread *t_abr_task; /* ABR task timer. */
+ struct event *t_abr_task; /* ABR task timer. */
struct list *oi_write_q;
uint32_t redist_count;
diff --git a/ospfclient/ospfclient.c b/ospfclient/ospfclient.c
index 970a039d8..2c554c9b7 100644
--- a/ospfclient/ospfclient.c
+++ b/ospfclient/ospfclient.c
@@ -69,7 +69,7 @@ struct my_opaque_lsa {
* ---------------------------------------------------------
*/
-static void lsa_delete(struct thread *t)
+static void lsa_delete(struct event *t)
{
struct ospf_apiclient *oclient;
struct in_addr area_id;
@@ -92,7 +92,7 @@ static void lsa_delete(struct thread *t)
printf("done, return code is = %d\n", rc);
}
-static void lsa_inject(struct thread *t)
+static void lsa_inject(struct event *t)
{
struct ospf_apiclient *cl;
struct in_addr ifaddr;
@@ -138,7 +138,7 @@ static void lsa_inject(struct thread *t)
/* This thread handles asynchronous messages coming in from the OSPF
API server */
-static void lsa_read(struct thread *thread)
+static void lsa_read(struct event *thread)
{
struct ospf_apiclient *oclient;
int fd;
@@ -269,7 +269,7 @@ static int usage(void)
int main(int argc, char *argv[])
{
- struct thread thread;
+ struct event thread;
args = argv;
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 91f4d77a8..aa1798ff9 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -1727,7 +1727,7 @@ bool ospf_check_fr_enabled_all(struct ospf *ospf)
* @param thread
* @return 0.
*/
-static void ospf_abr_announce_non_dna_routers(struct thread *thread)
+static void ospf_abr_announce_non_dna_routers(struct event *thread)
{
struct ospf_area *area;
struct listnode *node;
@@ -2056,7 +2056,7 @@ void ospf_abr_task(struct ospf *ospf)
zlog_debug("%s: Stop", __func__);
}
-static void ospf_abr_task_timer(struct thread *thread)
+static void ospf_abr_task_timer(struct event *thread)
{
struct ospf *ospf = THREAD_ARG(thread);
diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c
index cc1ca6647..56731b751 100644
--- a/ospfd/ospf_apiserver.c
+++ b/ospfd/ospf_apiserver.c
@@ -360,7 +360,7 @@ void ospf_apiserver_free(struct ospf_apiserver *apiserv)
XFREE(MTYPE_APISERVER, apiserv);
}
-void ospf_apiserver_read(struct thread *thread)
+void ospf_apiserver_read(struct event *thread)
{
struct ospf_apiserver *apiserv;
struct msg *msg;
@@ -419,7 +419,7 @@ void ospf_apiserver_read(struct thread *thread)
msg_free(msg);
}
-void ospf_apiserver_sync_write(struct thread *thread)
+void ospf_apiserver_sync_write(struct event *thread)
{
struct ospf_apiserver *apiserv;
struct msg *msg;
@@ -479,7 +479,7 @@ out:
}
-void ospf_apiserver_async_write(struct thread *thread)
+void ospf_apiserver_async_write(struct event *thread)
{
struct ospf_apiserver *apiserv;
struct msg *msg;
@@ -577,7 +577,7 @@ int ospf_apiserver_serv_sock_family(unsigned short port, int family)
/* Accept connection request from external applications. For each
accepted connection allocate own connection instance. */
-void ospf_apiserver_accept(struct thread *thread)
+void ospf_apiserver_accept(struct event *thread)
{
int accept_sock;
int new_sync_sock;
diff --git a/ospfd/ospf_apiserver.h b/ospfd/ospf_apiserver.h
index a90d18573..0aaf67c1f 100644
--- a/ospfd/ospf_apiserver.h
+++ b/ospfd/ospf_apiserver.h
@@ -48,12 +48,12 @@ struct ospf_apiserver {
struct msg_fifo *out_async_fifo;
/* Read and write threads */
- struct thread *t_sync_read;
+ struct event *t_sync_read;
#ifdef USE_ASYNC_READ
- struct thread *t_async_read;
+ struct event *t_async_read;
#endif /* USE_ASYNC_READ */
- struct thread *t_sync_write;
- struct thread *t_async_write;
+ struct event *t_sync_write;
+ struct event *t_async_write;
};
enum ospf_apiserver_event {
@@ -79,10 +79,10 @@ extern void ospf_apiserver_free(struct ospf_apiserver *apiserv);
extern void ospf_apiserver_event(enum ospf_apiserver_event event, int fd,
struct ospf_apiserver *apiserv);
extern int ospf_apiserver_serv_sock_family(unsigned short port, int family);
-extern void ospf_apiserver_accept(struct thread *thread);
-extern void ospf_apiserver_read(struct thread *thread);
-extern void ospf_apiserver_sync_write(struct thread *thread);
-extern void ospf_apiserver_async_write(struct thread *thread);
+extern void ospf_apiserver_accept(struct event *thread);
+extern void ospf_apiserver_read(struct event *thread);
+extern void ospf_apiserver_sync_write(struct event *thread);
+extern void ospf_apiserver_async_write(struct event *thread);
extern int ospf_apiserver_send_reply(struct ospf_apiserver *apiserv,
uint32_t seqnr, uint8_t rc);
diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c
index 85b5377e5..19f422d61 100644
--- a/ospfd/ospf_asbr.c
+++ b/ospfd/ospf_asbr.c
@@ -264,7 +264,7 @@ void ospf_asbr_status_update(struct ospf *ospf, uint8_t status)
/* If there's redistribution configured, we need to refresh external
* LSAs in order to install Type-7 and flood to all NSSA Areas
*/
-static void ospf_asbr_nssa_redist_update_timer(struct thread *thread)
+static void ospf_asbr_nssa_redist_update_timer(struct event *thread)
{
struct ospf *ospf = THREAD_ARG(thread);
int type;
@@ -1040,7 +1040,7 @@ static void ospf_handle_external_aggr_update(struct ospf *ospf)
}
}
-static void ospf_asbr_external_aggr_process(struct thread *thread)
+static void ospf_asbr_external_aggr_process(struct event *thread)
{
struct ospf *ospf = THREAD_ARG(thread);
int operation = 0;
diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c
index ad7dac0ab..61f87bb2d 100644
--- a/ospfd/ospf_ase.c
+++ b/ospfd/ospf_ase.c
@@ -549,7 +549,7 @@ static int ospf_ase_compare_tables(struct ospf *ospf,
return 0;
}
-static void ospf_ase_calculate_timer(struct thread *t)
+static void ospf_ase_calculate_timer(struct event *t)
{
struct ospf *ospf;
struct ospf_lsa *lsa;
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c
index d712d7b5f..22d67c406 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
@@ -235,7 +235,7 @@ const char *ospf_timeval_dump(struct timeval *t, char *buf, size_t size)
return buf;
}
-const char *ospf_timer_dump(struct thread *t, char *buf, size_t size)
+const char *ospf_timer_dump(struct event *t, char *buf, size_t size)
{
struct timeval result;
if (!t)
diff --git a/ospfd/ospf_dump.h b/ospfd/ospf_dump.h
index 0f217971e..2a58c8630 100644
--- a/ospfd/ospf_dump.h
+++ b/ospfd/ospf_dump.h
@@ -142,7 +142,7 @@ extern const char *ospf_if_name_string(struct ospf_interface *);
extern int ospf_nbr_ism_state(struct ospf_neighbor *nbr);
extern void ospf_nbr_ism_state_message(struct ospf_neighbor *nbr, char *buf,
size_t size);
-extern const char *ospf_timer_dump(struct thread *, char *, size_t);
+extern const char *ospf_timer_dump(struct event *, char *, size_t);
extern const char *ospf_timeval_dump(struct timeval *, char *, size_t);
extern void ospf_packet_dump(struct stream *);
extern void ospf_debug_init(void);
diff --git a/ospfd/ospf_gr.c b/ospfd/ospf_gr.c
index e83ff1dcc..8c1274739 100644
--- a/ospfd/ospf_gr.c
+++ b/ospfd/ospf_gr.c
@@ -495,7 +495,7 @@ void ospf_gr_check_adjs(struct ospf *ospf)
}
/* Handling of grace period expiry. */
-static void ospf_gr_grace_period_expired(struct thread *thread)
+static void ospf_gr_grace_period_expired(struct event *thread)
{
struct ospf *ospf = THREAD_ARG(thread);
diff --git a/ospfd/ospf_gr.h b/ospfd/ospf_gr.h
index 65aa91d42..9760bb172 100644
--- a/ospfd/ospf_gr.h
+++ b/ospfd/ospf_gr.h
@@ -90,7 +90,7 @@ struct ospf_helper_info {
* helper until this timer until
* this timer expires.
*/
- struct thread *t_grace_timer;
+ struct event *t_grace_timer;
/* Helper status */
uint32_t gr_helper_status;
diff --git a/ospfd/ospf_gr_helper.c b/ospfd/ospf_gr_helper.c
index 522c9b71b..fa78c53b1 100644
--- a/ospfd/ospf_gr_helper.c
+++ b/ospfd/ospf_gr_helper.c
@@ -329,7 +329,7 @@ static int ospf_extract_grace_lsa_fields(struct ospf_lsa *lsa,
* Returns:
* Nothing
*/
-static void ospf_handle_grace_timer_expiry(struct thread *thread)
+static void ospf_handle_grace_timer_expiry(struct event *thread)
{
struct ospf_neighbor *nbr = THREAD_ARG(thread);
diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h
index 0ee0cd4a3..8625a72ac 100644
--- a/ospfd/ospf_interface.h
+++ b/ospfd/ospf_interface.h
@@ -228,12 +228,12 @@ struct ospf_interface {
uint32_t v_ls_ack; /* Delayed Link State Acknowledgment */
/* Threads. */
- struct thread *t_hello; /* timer */
- struct thread *t_wait; /* timer */
- struct thread *t_ls_ack; /* timer */
- struct thread *t_ls_ack_direct; /* event */
- struct thread *t_ls_upd_event; /* event */
- struct thread *t_opaque_lsa_self; /* Type-9 Opaque-LSAs */
+ struct event *t_hello; /* timer */
+ struct event *t_wait; /* timer */
+ struct event *t_ls_ack; /* timer */
+ struct event *t_ls_ack_direct; /* event */
+ struct event *t_ls_upd_event; /* event */
+ struct event *t_opaque_lsa_self; /* Type-9 Opaque-LSAs */
int on_write_q;
diff --git a/ospfd/ospf_ism.c b/ospfd/ospf_ism.c
index bc236406d..74c77439a 100644
--- a/ospfd/ospf_ism.c
+++ b/ospfd/ospf_ism.c
@@ -237,7 +237,7 @@ int ospf_dr_election(struct ospf_interface *oi)
}
-void ospf_hello_timer(struct thread *thread)
+void ospf_hello_timer(struct event *thread)
{
struct ospf_interface *oi;
@@ -254,7 +254,7 @@ void ospf_hello_timer(struct thread *thread)
OSPF_HELLO_TIMER_ON(oi);
}
-static void ospf_wait_timer(struct thread *thread)
+static void ospf_wait_timer(struct event *thread)
{
struct ospf_interface *oi;
@@ -560,7 +560,7 @@ static void ism_change_state(struct ospf_interface *oi, int state)
}
/* Execute ISM event process. */
-void ospf_ism_event(struct thread *thread)
+void ospf_ism_event(struct event *thread)
{
int event;
int next_state;
diff --git a/ospfd/ospf_ism.h b/ospfd/ospf_ism.h
index d0516f61a..4ae86a318 100644
--- a/ospfd/ospf_ism.h
+++ b/ospfd/ospf_ism.h
@@ -72,9 +72,9 @@
thread_execute(master, ospf_ism_event, (I), (E))
/* Prototypes. */
-extern void ospf_ism_event(struct thread *thread);
+extern void ospf_ism_event(struct event *thread);
extern void ism_change_status(struct ospf_interface *, int);
-extern void ospf_hello_timer(struct thread *thread);
+extern void ospf_hello_timer(struct event *thread);
extern int ospf_dr_election(struct ospf_interface *oi);
DECLARE_HOOK(ospf_ism_change,
diff --git a/ospfd/ospf_ldp_sync.c b/ospfd/ospf_ldp_sync.c
index c1f245d3b..92e07dc5e 100644
--- a/ospfd/ospf_ldp_sync.c
+++ b/ospfd/ospf_ldp_sync.c
@@ -339,7 +339,7 @@ static int ospf_ldp_sync_ism_change(struct ospf_interface *oi, int state,
/*
* LDP-SYNC holddown timer routines
*/
-static void ospf_ldp_sync_holddown_timer(struct thread *thread)
+static void ospf_ldp_sync_holddown_timer(struct event *thread)
{
struct interface *ifp;
struct ospf_if_params *params;
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 9ad1fca74..92ad9951a 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -742,7 +742,7 @@ void ospf_router_lsa_body_set(struct stream **s, struct ospf_area *area)
stream_putw_at(*s, putp, cnt);
}
-static void ospf_stub_router_timer(struct thread *t)
+static void ospf_stub_router_timer(struct event *t)
{
struct ospf_area *area = THREAD_ARG(t);
@@ -3042,7 +3042,7 @@ int ospf_check_nbr_status(struct ospf *ospf)
}
-void ospf_maxage_lsa_remover(struct thread *thread)
+void ospf_maxage_lsa_remover(struct event *thread)
{
struct ospf *ospf = THREAD_ARG(thread);
struct ospf_lsa *lsa, *old;
@@ -3290,7 +3290,7 @@ static int ospf_lsa_maxage_walker_remover(struct ospf *ospf,
}
/* Periodical check of MaxAge LSA. */
-void ospf_lsa_maxage_walker(struct thread *thread)
+void ospf_lsa_maxage_walker(struct event *thread)
{
struct ospf *ospf = THREAD_ARG(thread);
struct route_node *rn;
@@ -3838,7 +3838,7 @@ struct lsa_action {
struct ospf_lsa *lsa;
};
-static void ospf_lsa_action(struct thread *t)
+static void ospf_lsa_action(struct event *t)
{
struct lsa_action *data;
@@ -4029,7 +4029,7 @@ void ospf_refresher_unregister_lsa(struct ospf *ospf, struct ospf_lsa *lsa)
}
}
-void ospf_lsa_refresh_walker(struct thread *t)
+void ospf_lsa_refresh_walker(struct event *t)
{
struct list *refresh_list;
struct listnode *node, *nnode;
diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h
index 3c7ea3fda..8ab293f4d 100644
--- a/ospfd/ospf_lsa.h
+++ b/ospfd/ospf_lsa.h
@@ -300,7 +300,7 @@ extern struct ospf_lsa *ospf_lsa_lookup_by_prefix(struct ospf_lsdb *, uint8_t,
extern void ospf_lsa_maxage(struct ospf *, struct ospf_lsa *);
extern uint32_t get_metric(uint8_t *);
-extern void ospf_lsa_maxage_walker(struct thread *thread);
+extern void ospf_lsa_maxage_walker(struct event *thread);
extern struct ospf_lsa *ospf_lsa_refresh(struct ospf *, struct ospf_lsa *);
extern void ospf_external_lsa_refresh_default(struct ospf *);
@@ -320,7 +320,7 @@ extern void ospf_schedule_lsa_flush_area(struct ospf_area *, struct ospf_lsa *);
extern void ospf_refresher_register_lsa(struct ospf *, struct ospf_lsa *);
extern void ospf_refresher_unregister_lsa(struct ospf *, struct ospf_lsa *);
-extern void ospf_lsa_refresh_walker(struct thread *thread);
+extern void ospf_lsa_refresh_walker(struct event *thread);
extern void ospf_lsa_maxage_delete(struct ospf *, struct ospf_lsa *);
@@ -346,7 +346,7 @@ extern void ospf_check_and_gen_init_seq_lsa(struct ospf_interface *oi,
struct ospf_lsa *lsa);
extern void ospf_flush_lsa_from_area(struct ospf *ospf, struct in_addr area_id,
int type);
-extern void ospf_maxage_lsa_remover(struct thread *thread);
+extern void ospf_maxage_lsa_remover(struct event *thread);
extern bool ospf_check_dna_lsa(const struct ospf_lsa *lsa);
extern void ospf_refresh_area_self_lsas(struct ospf_area *area);
diff --git a/ospfd/ospf_neighbor.h b/ospfd/ospf_neighbor.h
index 7bd5b1209..07d095f03 100644
--- a/ospfd/ospf_neighbor.h
+++ b/ospfd/ospf_neighbor.h
@@ -57,11 +57,11 @@ struct ospf_neighbor {
uint32_t v_ls_upd;
/* Threads. */
- struct thread *t_inactivity;
- struct thread *t_db_desc;
- struct thread *t_ls_req;
- struct thread *t_ls_upd;
- struct thread *t_hello_reply;
+ struct event *t_inactivity;
+ struct event *t_db_desc;
+ struct event *t_ls_req;
+ struct event *t_ls_upd;
+ struct event *t_hello_reply;
/* NBMA configured neighbour */
struct ospf_nbr_nbma *nbr_nbma;
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c
index 57aa49254..71aeaa72a 100644
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -44,7 +44,7 @@ DEFINE_HOOK(ospf_nsm_change,
static void nsm_clear_adj(struct ospf_neighbor *);
/* OSPF NSM Timer functions. */
-static void ospf_inactivity_timer(struct thread *thread)
+static void ospf_inactivity_timer(struct event *thread)
{
struct ospf_neighbor *nbr;
@@ -71,7 +71,7 @@ static void ospf_inactivity_timer(struct thread *thread)
}
}
-static void ospf_db_desc_timer(struct thread *thread)
+static void ospf_db_desc_timer(struct event *thread)
{
struct ospf_neighbor *nbr;
@@ -791,7 +791,7 @@ static void nsm_change_state(struct ospf_neighbor *nbr, int state)
}
/* Execute NSM event process. */
-void ospf_nsm_event(struct thread *thread)
+void ospf_nsm_event(struct event *thread)
{
int event;
int next_state;
diff --git a/ospfd/ospf_nsm.h b/ospfd/ospf_nsm.h
index b53a05914..c345be286 100644
--- a/ospfd/ospf_nsm.h
+++ b/ospfd/ospf_nsm.h
@@ -52,7 +52,7 @@
thread_execute(master, ospf_nsm_event, (N), (E))
/* Prototypes. */
-extern void ospf_nsm_event(struct thread *);
+extern void ospf_nsm_event(struct event *);
extern void ospf_check_nbr_loading(struct ospf_neighbor *);
extern int ospf_db_summary_isempty(struct ospf_neighbor *);
extern int ospf_db_summary_count(struct ospf_neighbor *);
diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c
index 0626f1060..1fe44cd1a 100644
--- a/ospfd/ospf_opaque.c
+++ b/ospfd/ospf_opaque.c
@@ -479,7 +479,7 @@ struct opaque_info_per_type {
* to (re-)originate their own Opaque-LSAs out-of-sync with others.
* This thread is prepared for that specific purpose.
*/
- struct thread *t_opaque_lsa_self;
+ struct event *t_opaque_lsa_self;
/*
* Backpointer to an "owner" which is LSA-type dependent.
@@ -501,7 +501,7 @@ struct opaque_info_per_id {
uint32_t opaque_id;
/* Thread for refresh/flush scheduling for this opaque-type/id. */
- struct thread *t_opaque_lsa_self;
+ struct event *t_opaque_lsa_self;
/* Backpointer to Opaque-LSA control information per opaque-type. */
struct opaque_info_per_type *opqctl_type;
@@ -1284,9 +1284,9 @@ out:
* Following are Opaque-LSA origination/refresh management functions.
*------------------------------------------------------------------------*/
-static void ospf_opaque_type9_lsa_originate(struct thread *t);
-static void ospf_opaque_type10_lsa_originate(struct thread *t);
-static void ospf_opaque_type11_lsa_originate(struct thread *t);
+static void ospf_opaque_type9_lsa_originate(struct event *t);
+static void ospf_opaque_type10_lsa_originate(struct event *t);
+static void ospf_opaque_type11_lsa_originate(struct event *t);
static void ospf_opaque_lsa_reoriginate_resume(struct list *listtop, void *arg);
void ospf_opaque_lsa_originate_schedule(struct ospf_interface *oi, int *delay0)
@@ -1456,7 +1456,7 @@ void ospf_opaque_lsa_originate_schedule(struct ospf_interface *oi, int *delay0)
*delay0 = delay;
}
-static void ospf_opaque_type9_lsa_originate(struct thread *t)
+static void ospf_opaque_type9_lsa_originate(struct event *t)
{
struct ospf_interface *oi;
@@ -1470,7 +1470,7 @@ static void ospf_opaque_type9_lsa_originate(struct thread *t)
opaque_lsa_originate_callback(ospf_opaque_type9_funclist, oi);
}
-static void ospf_opaque_type10_lsa_originate(struct thread *t)
+static void ospf_opaque_type10_lsa_originate(struct event *t)
{
struct ospf_area *area;
@@ -1485,7 +1485,7 @@ static void ospf_opaque_type10_lsa_originate(struct thread *t)
opaque_lsa_originate_callback(ospf_opaque_type10_funclist, area);
}
-static void ospf_opaque_type11_lsa_originate(struct thread *t)
+static void ospf_opaque_type11_lsa_originate(struct event *t)
{
struct ospf *top;
@@ -1648,10 +1648,10 @@ struct ospf_lsa *ospf_opaque_lsa_refresh(struct ospf_lsa *lsa)
static struct ospf_lsa *pseudo_lsa(struct ospf_interface *oi,
struct ospf_area *area, uint8_t lsa_type,
uint8_t opaque_type);
-static void ospf_opaque_type9_lsa_reoriginate_timer(struct thread *t);
-static void ospf_opaque_type10_lsa_reoriginate_timer(struct thread *t);
-static void ospf_opaque_type11_lsa_reoriginate_timer(struct thread *t);
-static void ospf_opaque_lsa_refresh_timer(struct thread *t);
+static void ospf_opaque_type9_lsa_reoriginate_timer(struct event *t);
+static void ospf_opaque_type10_lsa_reoriginate_timer(struct event *t);
+static void ospf_opaque_type11_lsa_reoriginate_timer(struct event *t);
+static void ospf_opaque_lsa_refresh_timer(struct event *t);
void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
uint8_t lsa_type, uint8_t opaque_type)
@@ -1662,7 +1662,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
struct ospf_lsa *lsa;
struct opaque_info_per_type *oipt;
- void (*func)(struct thread * t) = NULL;
+ void (*func)(struct event * t) = NULL;
int delay;
switch (lsa_type) {
@@ -1822,7 +1822,7 @@ static struct ospf_lsa *pseudo_lsa(struct ospf_interface *oi,
return &lsa;
}
-static void ospf_opaque_type9_lsa_reoriginate_timer(struct thread *t)
+static void ospf_opaque_type9_lsa_reoriginate_timer(struct event *t)
{
struct opaque_info_per_type *oipt;
struct ospf_opaque_functab *functab;
@@ -1863,7 +1863,7 @@ static void ospf_opaque_type9_lsa_reoriginate_timer(struct thread *t)
(*functab->lsa_originator)(oi);
}
-static void ospf_opaque_type10_lsa_reoriginate_timer(struct thread *t)
+static void ospf_opaque_type10_lsa_reoriginate_timer(struct event *t)
{
struct opaque_info_per_type *oipt;
struct ospf_opaque_functab *functab;
@@ -1912,7 +1912,7 @@ static void ospf_opaque_type10_lsa_reoriginate_timer(struct thread *t)
(*functab->lsa_originator)(area);
}
-static void ospf_opaque_type11_lsa_reoriginate_timer(struct thread *t)
+static void ospf_opaque_type11_lsa_reoriginate_timer(struct event *t)
{
struct opaque_info_per_type *oipt;
struct ospf_opaque_functab *functab;
@@ -2012,7 +2012,7 @@ out:
return;
}
-static void ospf_opaque_lsa_refresh_timer(struct thread *t)
+static void ospf_opaque_lsa_refresh_timer(struct event *t)
{
struct opaque_info_per_id *oipi;
struct ospf_opaque_functab *functab;
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 1462ad48f..7c5fe441f 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -439,7 +439,7 @@ static int ospf_make_md5_digest(struct ospf_interface *oi,
}
-static void ospf_ls_req_timer(struct thread *thread)
+static void ospf_ls_req_timer(struct event *thread)
{
struct ospf_neighbor *nbr;
@@ -462,7 +462,7 @@ void ospf_ls_req_event(struct ospf_neighbor *nbr)
/* Cyclic timer function. Fist registered in ospf_nbr_new () in
ospf_neighbor.c */
-void ospf_ls_upd_timer(struct thread *thread)
+void ospf_ls_upd_timer(struct event *thread)
{
struct ospf_neighbor *nbr;
@@ -520,7 +520,7 @@ void ospf_ls_upd_timer(struct thread *thread)
OSPF_NSM_TIMER_ON(nbr->t_ls_upd, ospf_ls_upd_timer, nbr->v_ls_upd);
}
-void ospf_ls_ack_timer(struct thread *thread)
+void ospf_ls_ack_timer(struct event *thread)
{
struct ospf_interface *oi;
@@ -608,7 +608,7 @@ static void ospf_write_frags(int fd, struct ospf_packet *op, struct ip *iph,
}
#endif /* WANT_OSPF_WRITE_FRAGMENT */
-static void ospf_write(struct thread *thread)
+static void ospf_write(struct event *thread)
{
struct ospf *ospf = THREAD_ARG(thread);
struct ospf_interface *oi;
@@ -3203,7 +3203,7 @@ static enum ospf_read_return_enum ospf_read_helper(struct ospf *ospf)
}
/* Starting point of packet process function. */
-void ospf_read(struct thread *thread)
+void ospf_read(struct event *thread)
{
struct ospf *ospf;
int32_t count = 0;
@@ -3738,7 +3738,7 @@ static void ospf_poll_send(struct ospf_nbr_nbma *nbr_nbma)
ospf_hello_send_sub(oi, nbr_nbma->addr.s_addr);
}
-void ospf_poll_timer(struct thread *thread)
+void ospf_poll_timer(struct event *thread)
{
struct ospf_nbr_nbma *nbr_nbma;
@@ -3757,7 +3757,7 @@ void ospf_poll_timer(struct thread *thread)
}
-void ospf_hello_reply_timer(struct thread *thread)
+void ospf_hello_reply_timer(struct event *thread)
{
struct ospf_neighbor *nbr;
@@ -4072,7 +4072,7 @@ static void ospf_ls_upd_queue_send(struct ospf_interface *oi,
ospf_packet_add(oi, op);
/* Call ospf_write() right away to send ospf packets to neighbors */
if (send_lsupd_now) {
- struct thread os_packet_thd;
+ struct event os_packet_thd;
os_packet_thd.arg = (void *)oi->ospf;
if (oi->on_write_q == 0) {
@@ -4103,7 +4103,7 @@ static void ospf_ls_upd_queue_send(struct ospf_interface *oi,
}
}
-static void ospf_ls_upd_send_queue_event(struct thread *thread)
+static void ospf_ls_upd_send_queue_event(struct event *thread)
{
struct ospf_interface *oi = THREAD_ARG(thread);
struct route_node *rn;
@@ -4250,7 +4250,7 @@ static void ospf_ls_ack_send_list(struct ospf_interface *oi, struct list *ack,
OSPF_ISM_WRITE_ON(oi->ospf);
}
-static void ospf_ls_ack_send_event(struct thread *thread)
+static void ospf_ls_ack_send_event(struct event *thread)
{
struct ospf_interface *oi = THREAD_ARG(thread);
diff --git a/ospfd/ospf_packet.h b/ospfd/ospf_packet.h
index e8b279b9d..4003e2add 100644
--- a/ospfd/ospf_packet.h
+++ b/ospfd/ospf_packet.h
@@ -124,7 +124,7 @@ extern struct ospf_packet *ospf_fifo_head(struct ospf_fifo *);
extern void ospf_fifo_flush(struct ospf_fifo *);
extern void ospf_fifo_free(struct ospf_fifo *);
-extern void ospf_read(struct thread *thread);
+extern void ospf_read(struct event *thread);
extern void ospf_hello_send(struct ospf_interface *);
extern void ospf_db_desc_send(struct ospf_neighbor *);
extern void ospf_db_desc_resend(struct ospf_neighbor *);
@@ -137,10 +137,10 @@ extern void ospf_ls_ack_send_delayed(struct ospf_interface *);
extern void ospf_ls_retransmit(struct ospf_interface *, struct ospf_lsa *);
extern void ospf_ls_req_event(struct ospf_neighbor *);
-extern void ospf_ls_upd_timer(struct thread *thread);
-extern void ospf_ls_ack_timer(struct thread *thread);
-extern void ospf_poll_timer(struct thread *thread);
-extern void ospf_hello_reply_timer(struct thread *thread);
+extern void ospf_ls_upd_timer(struct event *thread);
+extern void ospf_ls_ack_timer(struct event *thread);
+extern void ospf_poll_timer(struct event *thread);
+extern void ospf_hello_reply_timer(struct event *thread);
extern const struct message ospf_packet_type_str[];
extern const size_t ospf_packet_type_str_max;
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 272ef5ce0..314b89933 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -1842,7 +1842,7 @@ void ospf_spf_calculate_areas(struct ospf *ospf, struct route_table *new_table,
}
/* Worker for SPF calculation scheduler. */
-static void ospf_spf_calculate_schedule_worker(struct thread *thread)
+static void ospf_spf_calculate_schedule_worker(struct event *thread)
{
struct ospf *ospf = THREAD_ARG(thread);
struct route_table *new_table, *new_rtrs;
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c
index 00422e6b9..34614c0fb 100644
--- a/ospfd/ospf_sr.c
+++ b/ospfd/ospf_sr.c
@@ -457,7 +457,7 @@ int ospf_sr_local_block_release_label(mpls_label_t label)
*
* @return 1 on success
*/
-static void sr_start_label_manager(struct thread *start)
+static void sr_start_label_manager(struct event *start)
{
struct ospf *ospf;
diff --git a/ospfd/ospf_sr.h b/ospfd/ospf_sr.h
index 2c189083b..fa61f669a 100644
--- a/ospfd/ospf_sr.h
+++ b/ospfd/ospf_sr.h
@@ -243,7 +243,7 @@ struct ospf_sr_db {
uint8_t msd;
/* Thread timer to start Label Manager */
- struct thread *t_start_lm;
+ struct event *t_start_lm;
};
/* Structure aggregating all received SR info from LSAs by node */
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 67da49c21..c101913bc 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -509,7 +509,7 @@ bool ospf_external_default_routemap_apply_walk(struct ospf *ospf,
* Function to originate or flush default after applying
* route-map on all ei.
*/
-static void ospf_external_lsa_default_routemap_timer(struct thread *thread)
+static void ospf_external_lsa_default_routemap_timer(struct event *thread)
{
struct list *ext_list;
struct ospf *ospf = THREAD_ARG(thread);
@@ -1510,7 +1510,7 @@ int ospf_distribute_list_out_unset(struct ospf *ospf, int type,
}
/* distribute-list update timer. */
-static void ospf_distribute_list_update_timer(struct thread *thread)
+static void ospf_distribute_list_update_timer(struct event *thread)
{
struct route_node *rn;
struct external_info *ei;
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index c3edc9dd5..b167002b0 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -596,7 +596,7 @@ static void ospf_deferred_shutdown_finish(struct ospf *ospf)
}
/* Timer thread for G-R */
-static void ospf_deferred_shutdown_timer(struct thread *t)
+static void ospf_deferred_shutdown_timer(struct event *t)
{
struct ospf *ospf = THREAD_ARG(t);
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index 4df65ea75..79c11b820 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -145,7 +145,7 @@ struct ospf_gr_info {
bool prepare_in_progress;
bool finishing_restart;
uint32_t grace_period;
- struct thread *t_grace_period;
+ struct event *t_grace_period;
};
/* OSPF instance structure. */
@@ -257,31 +257,30 @@ struct ospf {
int redistribute; /* Num of redistributed protocols. */
/* Threads. */
- struct thread *t_abr_task; /* ABR task timer. */
- struct thread *t_abr_fr; /* ABR FR timer. */
- struct thread *t_asbr_check; /* ASBR check timer. */
- struct thread *t_asbr_nssa_redist_update; /* ASBR NSSA redistribution
+ struct event *t_abr_task; /* ABR task timer. */
+ struct event *t_abr_fr; /* ABR FR timer. */
+ struct event *t_asbr_check; /* ASBR check timer. */
+ struct event *t_asbr_nssa_redist_update; /* ASBR NSSA redistribution
update timer. */
- struct thread *t_distribute_update; /* Distirbute list update timer. */
- struct thread *t_spf_calc; /* SPF calculation timer. */
- struct thread *t_ase_calc; /* ASE calculation timer. */
- struct thread
- *t_opaque_lsa_self; /* Type-11 Opaque-LSAs origin event. */
- struct thread *t_sr_update; /* Segment Routing update timer */
+ struct event *t_distribute_update; /* Distirbute list update timer. */
+ struct event *t_spf_calc; /* SPF calculation timer. */
+ struct event *t_ase_calc; /* ASE calculation timer. */
+ struct event *t_opaque_lsa_self; /* Type-11 Opaque-LSAs origin event. */
+ struct event *t_sr_update; /* Segment Routing update timer */
unsigned int maxage_delay; /* Delay on Maxage remover timer, sec */
- struct thread *t_maxage; /* MaxAge LSA remover timer. */
- struct thread *t_maxage_walker; /* MaxAge LSA checking timer. */
+ struct event *t_maxage; /* MaxAge LSA remover timer. */
+ struct event *t_maxage_walker; /* MaxAge LSA checking timer. */
- struct thread
+ struct event
*t_deferred_shutdown; /* deferred/stub-router shutdown timer*/
- struct thread *t_write;
+ struct event *t_write;
#define OSPF_WRITE_INTERFACE_COUNT_DEFAULT 20
- struct thread *t_default_routemap_timer;
+ struct event *t_default_routemap_timer;
int write_oi_count; /* Num of packets sent per thread invocation */
- struct thread *t_read;
+ struct event *t_read;
int fd;
struct stream *ibuf;
struct list *oi_write_q;
@@ -313,7 +312,7 @@ struct ospf {
struct list *qs[OSPF_LSA_REFRESHER_SLOTS];
} lsa_refresh_queue;
- struct thread *t_lsa_refresher;
+ struct event *t_lsa_refresher;
time_t lsa_refresher_started;
#define OSPF_LSA_REFRESH_INTERVAL_DEFAULT 10
uint16_t lsa_refresh_interval;
@@ -382,7 +381,7 @@ struct ospf {
/* delay timer to process external routes
* with summary address.
*/
- struct thread *t_external_aggr;
+ struct event *t_external_aggr;
/* delay interval in seconds */
uint16_t aggr_delay_interval;
@@ -578,8 +577,8 @@ struct ospf_area {
struct p_spaces_head *p_spaces;
/* Threads. */
- struct thread *t_stub_router; /* Stub-router timer */
- struct thread *t_opaque_lsa_self; /* Type-10 Opaque-LSAs origin. */
+ struct event *t_stub_router; /* Stub-router timer */
+ struct event *t_opaque_lsa_self; /* Type-10 Opaque-LSAs origin. */
/* Statistics field. */
uint32_t spf_calculation; /* SPF Calculation Count. */
@@ -627,7 +626,7 @@ struct ospf_nbr_nbma {
uint32_t v_poll;
/* Poll timer thread. */
- struct thread *t_poll;
+ struct event *t_poll;
/* State change. */
uint32_t state_change;
diff --git a/pathd/path_pcep_controller.c b/pathd/path_pcep_controller.c
index 405749b50..92ab5a63b 100644
--- a/pathd/path_pcep_controller.c
+++ b/pathd/path_pcep_controller.c
@@ -78,28 +78,28 @@ struct get_pcep_session_args {
/* Internal Functions Called From Main Thread */
static int pcep_ctrl_halt_cb(struct frr_pthread *fpt, void **res);
-static void pcep_refine_path_event_cb(struct thread *thread);
+static void pcep_refine_path_event_cb(struct event *thread);
/* Internal Functions Called From Controller Thread */
-static void pcep_thread_finish_event_handler(struct thread *thread);
+static void pcep_thread_finish_event_handler(struct event *thread);
/* Controller Thread Timer Handler */
static int schedule_thread_timer(struct ctrl_state *ctrl_state, int pcc_id,
enum pcep_ctrl_timer_type timer_type,
enum pcep_ctrl_timeout_type timeout_type,
uint32_t delay, void *payload,
- struct thread **thread);
+ struct event **thread);
static int schedule_thread_timer_with_cb(
struct ctrl_state *ctrl_state, int pcc_id,
enum pcep_ctrl_timer_type timer_type,
enum pcep_ctrl_timeout_type timeout_type, uint32_t delay, void *payload,
- struct thread **thread, pcep_ctrl_thread_callback timer_cb);
-static void pcep_thread_timer_handler(struct thread *thread);
+ struct event **thread, pcep_ctrl_thread_callback timer_cb);
+static void pcep_thread_timer_handler(struct event *thread);
/* Controller Thread Socket read/write Handler */
static int schedule_thread_socket(struct ctrl_state *ctrl_state, int pcc_id,
enum pcep_ctrl_socket_type type, bool is_read,
- void *payload, int fd, struct thread **thread,
+ void *payload, int fd, struct event **thread,
pcep_ctrl_thread_callback cb);
/* Controller Thread Event Handler */
@@ -110,7 +110,7 @@ static int send_to_thread_with_cb(struct ctrl_state *ctrl_state, int pcc_id,
enum pcep_ctrl_event_type type,
uint32_t sub_type, void *payload,
pcep_ctrl_thread_callback event_cb);
-static void pcep_thread_event_handler(struct thread *thread);
+static void pcep_thread_event_handler(struct event *thread);
static int pcep_thread_event_update_pcc_options(struct ctrl_state *ctrl_state,
struct pcc_opts *opts);
static int pcep_thread_event_update_pce_options(struct ctrl_state *ctrl_state,
@@ -135,7 +135,7 @@ pcep_thread_path_refined_event(struct ctrl_state *ctrl_state,
/* Main Thread Event Handler */
static int send_to_main(struct ctrl_state *ctrl_state, int pcc_id,
enum pcep_main_event_type type, void *payload);
-static void pcep_main_event_handler(struct thread *thread);
+static void pcep_main_event_handler(struct event *thread);
/* Helper functions */
static void set_ctrl_state(struct frr_pthread *fpt,
@@ -326,7 +326,7 @@ int pcep_ctrl_halt_cb(struct frr_pthread *fpt, void **res)
return 0;
}
-void pcep_refine_path_event_cb(struct thread *thread)
+void pcep_refine_path_event_cb(struct event *thread)
{
struct pcep_refine_path_event_data *data = THREAD_ARG(thread);
assert(data != NULL);
@@ -377,14 +377,14 @@ void pcep_thread_remove_candidate_path_segments(struct ctrl_state *ctrl_state,
void pcep_thread_schedule_sync_best_pce(struct ctrl_state *ctrl_state,
int pcc_id, int delay,
- struct thread **thread)
+ struct event **thread)
{
schedule_thread_timer(ctrl_state, pcc_id, TM_CALCULATE_BEST_PCE,
TO_UNDEFINED, delay, NULL, thread);
}
-void pcep_thread_cancel_timer(struct thread **thread)
+void pcep_thread_cancel_timer(struct event **thread)
{
if (thread == NULL || *thread == NULL) {
return;
@@ -405,7 +405,7 @@ void pcep_thread_cancel_timer(struct thread **thread)
}
void pcep_thread_schedule_reconnect(struct ctrl_state *ctrl_state, int pcc_id,
- int retry_count, struct thread **thread)
+ int retry_count, struct event **thread)
{
uint32_t delay = backoff_delay(MAX_RECONNECT_DELAY, 1, retry_count);
PCEP_DEBUG("Schedule RECONNECT_PCC for %us (retry %u)", delay,
@@ -417,7 +417,7 @@ void pcep_thread_schedule_reconnect(struct ctrl_state *ctrl_state, int pcc_id,
void pcep_thread_schedule_timeout(struct ctrl_state *ctrl_state, int pcc_id,
enum pcep_ctrl_timeout_type timeout_type,
uint32_t delay, void *param,
- struct thread **thread)
+ struct event **thread)
{
assert(timeout_type > TO_UNDEFINED);
assert(timeout_type < TO_MAX);
@@ -429,7 +429,7 @@ void pcep_thread_schedule_timeout(struct ctrl_state *ctrl_state, int pcc_id,
void pcep_thread_schedule_pceplib_timer(struct ctrl_state *ctrl_state,
int delay, void *payload,
- struct thread **thread,
+ struct event **thread,
pcep_ctrl_thread_callback timer_cb)
{
PCEP_DEBUG("Schedule PCEPLIB_TIMER for %us", delay);
@@ -440,7 +440,7 @@ void pcep_thread_schedule_pceplib_timer(struct ctrl_state *ctrl_state,
void pcep_thread_schedule_session_timeout(struct ctrl_state *ctrl_state,
int pcc_id, int delay,
- struct thread **thread)
+ struct event **thread)
{
PCEP_DEBUG("Schedule session_timeout interval for %us", delay);
schedule_thread_timer(ctrl_state, pcc_id, TM_SESSION_TIMEOUT_PCC,
@@ -493,7 +493,7 @@ void pcep_thread_path_refined_event(struct ctrl_state *ctrl_state,
/* ------------ Internal Functions Called From Controller Thread ------------ */
-void pcep_thread_finish_event_handler(struct thread *thread)
+void pcep_thread_finish_event_handler(struct event *thread)
{
int i;
struct frr_pthread *fpt = THREAD_ARG(thread);
@@ -521,7 +521,7 @@ int schedule_thread_timer_with_cb(struct ctrl_state *ctrl_state, int pcc_id,
enum pcep_ctrl_timer_type timer_type,
enum pcep_ctrl_timeout_type timeout_type,
uint32_t delay, void *payload,
- struct thread **thread,
+ struct event **thread,
pcep_ctrl_thread_callback timer_cb)
{
assert(thread != NULL);
@@ -544,14 +544,14 @@ int schedule_thread_timer_with_cb(struct ctrl_state *ctrl_state, int pcc_id,
int schedule_thread_timer(struct ctrl_state *ctrl_state, int pcc_id,
enum pcep_ctrl_timer_type timer_type,
enum pcep_ctrl_timeout_type timeout_type,
- uint32_t delay, void *payload, struct thread **thread)
+ uint32_t delay, void *payload, struct event **thread)
{
return schedule_thread_timer_with_cb(ctrl_state, pcc_id, timer_type,
timeout_type, delay, payload,
thread, pcep_thread_timer_handler);
}
-void pcep_thread_timer_handler(struct thread *thread)
+void pcep_thread_timer_handler(struct event *thread)
{
/* data unpacking */
struct pcep_ctrl_timer_data *data = THREAD_ARG(thread);
@@ -598,7 +598,7 @@ void pcep_thread_timer_handler(struct thread *thread)
}
}
-void pcep_thread_pcep_event(struct thread *thread)
+void pcep_thread_pcep_event(struct event *thread)
{
struct pcep_ctrl_event_data *data = THREAD_ARG(thread);
assert(data != NULL);
@@ -624,7 +624,7 @@ void pcep_thread_pcep_event(struct thread *thread)
int schedule_thread_socket(struct ctrl_state *ctrl_state, int pcc_id,
enum pcep_ctrl_socket_type type, bool is_read,
- void *payload, int fd, struct thread **thread,
+ void *payload, int fd, struct event **thread,
pcep_ctrl_thread_callback socket_cb)
{
assert(thread != NULL);
@@ -656,7 +656,7 @@ int pcep_thread_socket_write(void *fpt, void **thread, int fd, void *payload,
struct ctrl_state *ctrl_state = ((struct frr_pthread *)fpt)->data;
return schedule_thread_socket(ctrl_state, 0, SOCK_PCEPLIB, false,
- payload, fd, (struct thread **)thread,
+ payload, fd, (struct event **)thread,
socket_cb);
}
@@ -666,7 +666,7 @@ int pcep_thread_socket_read(void *fpt, void **thread, int fd, void *payload,
struct ctrl_state *ctrl_state = ((struct frr_pthread *)fpt)->data;
return schedule_thread_socket(ctrl_state, 0, SOCK_PCEPLIB, true,
- payload, fd, (struct thread **)thread,
+ payload, fd, (struct event **)thread,
socket_cb);
}
@@ -707,7 +707,7 @@ int send_to_thread_with_cb(struct ctrl_state *ctrl_state, int pcc_id,
return 0;
}
-void pcep_thread_event_handler(struct thread *thread)
+void pcep_thread_event_handler(struct event *thread)
{
/* data unpacking */
struct pcep_ctrl_event_data *data = THREAD_ARG(thread);
@@ -969,7 +969,7 @@ int send_to_main(struct ctrl_state *ctrl_state, int pcc_id,
return 0;
}
-void pcep_main_event_handler(struct thread *thread)
+void pcep_main_event_handler(struct event *thread)
{
/* data unpacking */
struct pcep_main_event_data *data = THREAD_ARG(thread);
diff --git a/pathd/path_pcep_controller.h b/pathd/path_pcep_controller.h
index c2359beb2..200a5db99 100644
--- a/pathd/path_pcep_controller.h
+++ b/pathd/path_pcep_controller.h
@@ -77,7 +77,7 @@ struct pcep_ctrl_socket_data {
void *payload;
};
-typedef void (*pcep_ctrl_thread_callback)(struct thread *);
+typedef void (*pcep_ctrl_thread_callback)(struct event *);
/* PCC connection information, populated in a thread-safe
* manner with pcep_ctrl_get_pcc_info() */
@@ -134,25 +134,25 @@ void pcep_thread_update_path(struct ctrl_state *ctrl_state, int pcc_id,
struct path *path);
void pcep_thread_initiate_path(struct ctrl_state *ctrl_state, int pcc_id,
struct path *path);
-void pcep_thread_cancel_timer(struct thread **thread);
+void pcep_thread_cancel_timer(struct event **thread);
void pcep_thread_schedule_reconnect(struct ctrl_state *ctrl_state, int pcc_id,
- int retry_count, struct thread **thread);
+ int retry_count, struct event **thread);
void pcep_thread_schedule_timeout(struct ctrl_state *ctrl_state, int pcc_id,
enum pcep_ctrl_timeout_type type,
uint32_t delay, void *param,
- struct thread **thread);
+ struct event **thread);
void pcep_thread_schedule_session_timeout(struct ctrl_state *ctrl_state,
int pcc_id, int delay,
- struct thread **thread);
+ struct event **thread);
void pcep_thread_remove_candidate_path_segments(struct ctrl_state *ctrl_state,
struct pcc_state *pcc_state);
void pcep_thread_schedule_sync_best_pce(struct ctrl_state *ctrl_state,
int pcc_id, int delay,
- struct thread **thread);
+ struct event **thread);
void pcep_thread_schedule_pceplib_timer(struct ctrl_state *ctrl_state,
int delay, void *payload,
- struct thread **thread,
+ struct event **thread,
pcep_ctrl_thread_callback cb);
int pcep_thread_socket_read(void *fpt, void **thread, int fd, void *payload,
pcep_ctrl_thread_callback cb);
@@ -161,7 +161,7 @@ int pcep_thread_socket_write(void *fpt, void **thread, int fd, void *payload,
int pcep_thread_send_ctrl_event(void *fpt, void *payload,
pcep_ctrl_thread_callback cb);
-void pcep_thread_pcep_event(struct thread *thread);
+void pcep_thread_pcep_event(struct event *thread);
int pcep_thread_pcc_count(struct ctrl_state *ctrl_state);
/* Called by the PCC to refine a path in the main thread */
int pcep_thread_refine_path(struct ctrl_state *ctrl_state, int pcc_id,
diff --git a/pathd/path_pcep_lib.c b/pathd/path_pcep_lib.c
index 502f2336c..dcf4921d7 100644
--- a/pathd/path_pcep_lib.c
+++ b/pathd/path_pcep_lib.c
@@ -33,8 +33,8 @@ static int pcep_lib_pceplib_socket_read_cb(void *fpt, void **thread, int fd,
void *payload);
static int pcep_lib_pceplib_socket_write_cb(void *fpt, void **thread, int fd,
void *payload);
-static void pcep_lib_socket_read_ready(struct thread *thread);
-static void pcep_lib_socket_write_ready(struct thread *thread);
+static void pcep_lib_socket_read_ready(struct event *thread);
+static void pcep_lib_socket_write_ready(struct event *thread);
/* pceplib pcep_event callbacks */
static void pcep_lib_pceplib_event_cb(void *fpt, pcep_event *event);
@@ -229,7 +229,7 @@ int pcep_lib_pceplib_socket_read_cb(void *fpt, void **thread, int fd,
/* Callbacks called by path_pcep_controller when a socket is ready to read/write
*/
-void pcep_lib_socket_write_ready(struct thread *thread)
+void pcep_lib_socket_write_ready(struct event *thread)
{
struct pcep_ctrl_socket_data *data = THREAD_ARG(thread);
assert(data != NULL);
@@ -238,7 +238,7 @@ void pcep_lib_socket_write_ready(struct thread *thread)
XFREE(MTYPE_PCEP, data);
}
-void pcep_lib_socket_read_ready(struct thread *thread)
+void pcep_lib_socket_read_ready(struct event *thread)
{
struct pcep_ctrl_socket_data *data = THREAD_ARG(thread);
assert(data != NULL);
diff --git a/pathd/path_pcep_pcc.h b/pathd/path_pcep_pcc.h
index 039d67d2e..f3d0f290a 100644
--- a/pathd/path_pcep_pcc.h
+++ b/pathd/path_pcep_pcc.h
@@ -41,7 +41,7 @@ struct req_map_data {
struct req_entry {
RB_ENTRY(req_entry) entry;
- struct thread *t_retry;
+ struct event *t_retry;
int retry_count;
bool was_sent;
struct path *path;
@@ -66,9 +66,9 @@ struct pcc_state {
pcep_session *sess;
uint32_t retry_count;
bool synchronized;
- struct thread *t_reconnect;
- struct thread *t_update_best;
- struct thread *t_session_timeout;
+ struct event *t_reconnect;
+ struct event *t_update_best;
+ struct event *t_session_timeout;
uint32_t next_reqid;
uint32_t next_plspid;
struct plspid_map_head plspid_map;
diff --git a/pathd/path_ted.c b/pathd/path_ted.c
index bc0da969e..d39371041 100644
--- a/pathd/path_ted.c
+++ b/pathd/path_ted.c
@@ -28,8 +28,8 @@ static void path_ted_unregister_vty(void);
static uint32_t path_ted_start_importing_igp(const char *daemon_str);
static uint32_t path_ted_stop_importing_igp(void);
static enum zclient_send_status path_ted_link_state_sync(void);
-static void path_ted_timer_handler_sync(struct thread *thread);
-static void path_ted_timer_handler_refresh(struct thread *thread);
+static void path_ted_timer_handler_sync(struct event *thread);
+static void path_ted_timer_handler_refresh(struct event *thread);
static int path_ted_cli_debug_config_write(struct vty *vty);
static int path_ted_cli_debug_set_all(uint32_t flags, bool set);
@@ -597,7 +597,7 @@ enum zclient_send_status path_ted_link_state_sync(void)
*
* @return status
*/
-void path_ted_timer_handler_sync(struct thread *thread)
+void path_ted_timer_handler_sync(struct event *thread)
{
/* data unpacking */
struct ted_state *data = THREAD_ARG(thread);
@@ -634,7 +634,7 @@ int path_ted_segment_list_refresh(void)
*
* @return status
*/
-void path_ted_timer_handler_refresh(struct thread *thread)
+void path_ted_timer_handler_refresh(struct event *thread)
{
if (!path_ted_is_initialized())
return;
diff --git a/pathd/path_ted.h b/pathd/path_ted.h
index 10cdd545f..e4f362f26 100644
--- a/pathd/path_ted.h
+++ b/pathd/path_ted.h
@@ -49,9 +49,9 @@ struct ted_state {
/* The TED itself as in link_state.h */
struct ls_ted *ted;
/* Timer for ted sync */
- struct thread *t_link_state_sync;
+ struct event *t_link_state_sync;
/* Timer for refresh sid in segment list */
- struct thread *t_segment_list_refresh;
+ struct event *t_segment_list_refresh;
/* delay interval in seconds */
uint32_t link_state_delay_interval;
/* delay interval refresh in seconds */
diff --git a/pathd/pathd.c b/pathd/pathd.c
index 86501f7ad..b11d90905 100644
--- a/pathd/pathd.c
+++ b/pathd/pathd.c
@@ -45,9 +45,9 @@ struct debug path_policy_debug;
static void trigger_pathd_candidate_created(struct srte_candidate *candidate);
-static void trigger_pathd_candidate_created_timer(struct thread *thread);
+static void trigger_pathd_candidate_created_timer(struct event *thread);
static void trigger_pathd_candidate_updated(struct srte_candidate *candidate);
-static void trigger_pathd_candidate_updated_timer(struct thread *thread);
+static void trigger_pathd_candidate_updated_timer(struct event *thread);
static void trigger_pathd_candidate_removed(struct srte_candidate *candidate);
static const char *
srte_candidate_metric_name(enum srte_candidate_metric_type type);
@@ -1297,7 +1297,7 @@ void trigger_pathd_candidate_created(struct srte_candidate *candidate)
(void *)candidate, HOOK_DELAY, &candidate->hook_timer);
}
-void trigger_pathd_candidate_created_timer(struct thread *thread)
+void trigger_pathd_candidate_created_timer(struct event *thread)
{
struct srte_candidate *candidate = THREAD_ARG(thread);
candidate->hook_timer = NULL;
@@ -1317,7 +1317,7 @@ void trigger_pathd_candidate_updated(struct srte_candidate *candidate)
(void *)candidate, HOOK_DELAY, &candidate->hook_timer);
}
-void trigger_pathd_candidate_updated_timer(struct thread *thread)
+void trigger_pathd_candidate_updated_timer(struct event *thread)
{
struct srte_candidate *candidate = THREAD_ARG(thread);
candidate->hook_timer = NULL;
diff --git a/pathd/pathd.h b/pathd/pathd.h
index f1a59b116..1af5d877a 100644
--- a/pathd/pathd.h
+++ b/pathd/pathd.h
@@ -311,7 +311,7 @@ struct srte_candidate {
uint32_t affinity_filters[MAX_AFFINITY_FILTER_TYPE];
/* Hooks delaying timer */
- struct thread *hook_timer;
+ struct event *hook_timer;
};
RB_HEAD(srte_candidate_head, srte_candidate);
diff --git a/pimd/pim6_mld.c b/pimd/pim6_mld.c
index c722add84..b0bcfcf5f 100644
--- a/pimd/pim6_mld.c
+++ b/pimd/pim6_mld.c
@@ -45,7 +45,7 @@ DEFINE_MTYPE_STATIC(PIMD, GM_SG, "MLD (S,G)");
DEFINE_MTYPE_STATIC(PIMD, GM_GRP_PENDING, "MLD group query state");
DEFINE_MTYPE_STATIC(PIMD, GM_GSQ_PENDING, "MLD group/source query aggregate");
-static void gm_t_query(struct thread *t);
+static void gm_t_query(struct event *t);
static void gm_trigger_specific(struct gm_sg *sg);
static void gm_sg_timer_start(struct gm_if *gm_ifp, struct gm_sg *sg,
struct timeval expire_wait);
@@ -1029,7 +1029,7 @@ static void gm_handle_v1_leave(struct gm_if *gm_ifp,
* its own path too and won't hit this. This is really only triggered when a
* host straight up disappears.
*/
-static void gm_t_expire(struct thread *t)
+static void gm_t_expire(struct event *t)
{
struct gm_if *gm_ifp = THREAD_ARG(t);
struct gm_packet_state *pkt;
@@ -1126,7 +1126,7 @@ static void gm_handle_q_general(struct gm_if *gm_ifp,
gm_ifp->n_pending, &pend->expiry);
}
-static void gm_t_sg_expire(struct thread *t)
+static void gm_t_sg_expire(struct event *t)
{
struct gm_sg *sg = THREAD_ARG(t);
struct gm_if *gm_ifp = sg->iface;
@@ -1232,7 +1232,7 @@ static void gm_handle_q_groupsrc(struct gm_if *gm_ifp,
}
}
-static void gm_t_grp_expire(struct thread *t)
+static void gm_t_grp_expire(struct event *t)
{
/* if we're here, that means when we received the group-specific query
* there was one or more active S,G for this group. For *,G the timer
@@ -1353,7 +1353,7 @@ static void gm_bump_querier(struct gm_if *gm_ifp)
thread_execute(router->master, gm_t_query, gm_ifp, 0);
}
-static void gm_t_other_querier(struct thread *t)
+static void gm_t_other_querier(struct event *t)
{
struct gm_if *gm_ifp = THREAD_ARG(t);
struct pim_interface *pim_ifp = gm_ifp->ifp->info;
@@ -1586,7 +1586,7 @@ static bool ip6_check_hopopts_ra(uint8_t *hopopts, size_t hopopt_len,
return false;
}
-static void gm_t_recv(struct thread *t)
+static void gm_t_recv(struct event *t)
{
struct pim_instance *pim = THREAD_ARG(t);
union {
@@ -1858,7 +1858,7 @@ static void gm_send_query(struct gm_if *gm_ifp, pim_addr grp,
}
}
-static void gm_t_query(struct thread *t)
+static void gm_t_query(struct event *t)
{
struct gm_if *gm_ifp = THREAD_ARG(t);
unsigned int timer_ms = gm_ifp->cur_query_intv;
@@ -1874,7 +1874,7 @@ static void gm_t_query(struct thread *t)
gm_send_query(gm_ifp, PIMADDR_ANY, NULL, 0, false);
}
-static void gm_t_sg_query(struct thread *t)
+static void gm_t_sg_query(struct event *t)
{
struct gm_sg *sg = THREAD_ARG(t);
@@ -1895,7 +1895,7 @@ static void gm_send_specific(struct gm_gsq_pending *pend_gsq)
XFREE(MTYPE_GM_GSQ_PENDING, pend_gsq);
}
-static void gm_t_gsq_pend(struct thread *t)
+static void gm_t_gsq_pend(struct event *t)
{
struct gm_gsq_pending *pend_gsq = THREAD_ARG(t);
diff --git a/pimd/pim6_mld.h b/pimd/pim6_mld.h
index 2af1c77c2..d3f1d3925 100644
--- a/pimd/pim6_mld.h
+++ b/pimd/pim6_mld.h
@@ -10,7 +10,7 @@
#include "typesafe.h"
#include "pim_addr.h"
-struct thread;
+struct event;
struct pim_instance;
struct gm_packet_sg;
struct gm_if;
@@ -65,14 +65,14 @@ struct gm_sg {
* (implies we haven't received any report yet, since it's cancelled
* by that)
*/
- struct thread *t_sg_expire;
+ struct event *t_sg_expire;
/* last-member-left triggered queries (group/group-source specific)
*
* this timer will be running even if we aren't the elected querier,
* in case the election result changes midway through.
*/
- struct thread *t_sg_query;
+ struct event *t_sg_query;
/* we must keep sending (QRV) queries even if we get a positive
* response, to make sure other routers are updated. query_sbit
@@ -226,7 +226,7 @@ struct gm_grp_pending {
pim_addr grp;
struct timeval query;
- struct thread *t_expire;
+ struct event *t_expire;
};
/* guaranteed MTU for IPv6 is 1280 bytes. IPv6 header is 40 bytes, MLDv2
@@ -247,7 +247,7 @@ struct gm_gsq_pending {
struct gm_gsq_pends_item itm;
struct gm_if *iface;
- struct thread *t_send;
+ struct event *t_send;
pim_addr grp;
bool s_bit;
@@ -300,7 +300,7 @@ struct gm_if_stats {
struct gm_if {
struct interface *ifp;
struct pim_instance *pim;
- struct thread *t_query, *t_other_querier, *t_expire;
+ struct event *t_query, *t_other_querier, *t_expire;
bool stopping;
diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c
index e46fa2cfa..9dfb6174c 100644
--- a/pimd/pim_assert.c
+++ b/pimd/pim_assert.c
@@ -493,7 +493,7 @@ static int pim_assert_cancel(struct pim_ifchannel *ch)
return pim_assert_do(ch, metric);
}
-static void on_assert_timer(struct thread *t)
+static void on_assert_timer(struct event *t)
{
struct pim_ifchannel *ch;
struct interface *ifp;
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c
index c249f323d..b9132f771 100644
--- a/pimd/pim_bsm.c
+++ b/pimd/pim_bsm.c
@@ -140,7 +140,7 @@ static struct bsgrp_node *pim_bsm_new_bsgrp_node(struct route_table *rt,
return bsgrp;
}
-static void pim_on_bs_timer(struct thread *t)
+static void pim_on_bs_timer(struct event *t)
{
struct route_node *rn;
struct bsm_scope *scope;
@@ -257,7 +257,7 @@ static bool is_hold_time_elapsed(void *data)
return true;
}
-static void pim_on_g2rp_timer(struct thread *t)
+static void pim_on_g2rp_timer(struct event *t)
{
struct bsm_rpinfo *bsrp;
struct bsm_rpinfo *bsrp_node;
diff --git a/pimd/pim_bsm.h b/pimd/pim_bsm.h
index 5e40adb80..fb09e3b1c 100644
--- a/pimd/pim_bsm.h
+++ b/pimd/pim_bsm.h
@@ -59,7 +59,7 @@ struct bsm_scope {
struct bsm_frags_head bsm_frags[1];
struct route_table *bsrp_table; /* group2rp mapping rcvd from BSR */
- struct thread *bs_timer; /* Boot strap timer */
+ struct event *bs_timer; /* Boot strap timer */
};
/* BSM packet (= fragment) - this is stored as list in bsm_frags inside scope
@@ -103,7 +103,7 @@ struct bsm_rpinfo {
uint16_t rp_holdtime; /* RP holdtime - g2rp timer value */
pim_addr rp_address; /* RP Address */
struct bsgrp_node *bsgrp_node; /* Back ptr to bsgrp_node */
- struct thread *g2rp_timer; /* Run only for elected RP node */
+ struct event *g2rp_timer; /* Run only for elected RP node */
};
extern int pim_bsm_rpinfo_cmp(const struct bsm_rpinfo *a,
diff --git a/pimd/pim_iface.h b/pimd/pim_iface.h
index 83079020b..0aff56d55 100644
--- a/pimd/pim_iface.h
+++ b/pimd/pim_iface.h
@@ -104,10 +104,10 @@ struct pim_interface {
struct gm_if *mld;
int pim_sock_fd; /* PIM socket file descriptor */
- struct thread *t_pim_sock_read; /* thread for reading PIM socket */
+ struct event *t_pim_sock_read; /* thread for reading PIM socket */
int64_t pim_sock_creation; /* timestamp of PIM socket creation */
- struct thread *t_pim_hello_timer;
+ struct event *t_pim_hello_timer;
int pim_hello_period;
int pim_default_holdtime;
int pim_triggered_hello_delay;
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index 98f594d0c..bb457306f 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -628,7 +628,7 @@ static void ifjoin_to_noinfo(struct pim_ifchannel *ch)
delete_on_noinfo(ch);
}
-static void on_ifjoin_expiry_timer(struct thread *t)
+static void on_ifjoin_expiry_timer(struct event *t)
{
struct pim_ifchannel *ch;
@@ -642,7 +642,7 @@ static void on_ifjoin_expiry_timer(struct thread *t)
/* ch may have been deleted */
}
-static void on_ifjoin_prune_pending_timer(struct thread *t)
+static void on_ifjoin_prune_pending_timer(struct event *t)
{
struct pim_ifchannel *ch;
int send_prune_echo; /* boolean */
diff --git a/pimd/pim_ifchannel.h b/pimd/pim_ifchannel.h
index 7ab491e99..4b0ff955f 100644
--- a/pimd/pim_ifchannel.h
+++ b/pimd/pim_ifchannel.h
@@ -86,13 +86,13 @@ struct pim_ifchannel {
/* Per-interface (S,G) Join/Prune State (Section 4.1.4 of RFC4601) */
enum pim_ifjoin_state ifjoin_state;
- struct thread *t_ifjoin_expiry_timer;
- struct thread *t_ifjoin_prune_pending_timer;
+ struct event *t_ifjoin_expiry_timer;
+ struct event *t_ifjoin_prune_pending_timer;
int64_t ifjoin_creation; /* Record uptime of ifjoin state */
/* Per-interface (S,G) Assert State (Section 4.6.1 of RFC4601) */
enum pim_ifassert_state ifassert_state;
- struct thread *t_ifassert_timer;
+ struct event *t_ifassert_timer;
pim_addr ifassert_winner;
struct pim_assert_metric ifassert_winner_metric;
int64_t ifassert_creation; /* Record uptime of ifassert state */
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c
index bff0c0683..3c1b0959d 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -29,7 +29,7 @@
#include "pim_tib.h"
static void group_timer_off(struct gm_group *group);
-static void pim_igmp_general_query(struct thread *t);
+static void pim_igmp_general_query(struct event *t);
void igmp_anysource_forward_start(struct pim_instance *pim,
struct gm_group *group)
@@ -325,7 +325,7 @@ struct gm_sock *pim_igmp_sock_lookup_ifaddr(struct list *igmp_sock_list,
return NULL;
}
-static void pim_igmp_other_querier_expire(struct thread *t)
+static void pim_igmp_other_querier_expire(struct event *t)
{
struct gm_sock *igmp;
@@ -887,7 +887,7 @@ void pim_igmp_general_query_off(struct gm_sock *igmp)
}
/* Issue IGMP general query */
-static void pim_igmp_general_query(struct thread *t)
+static void pim_igmp_general_query(struct event *t)
{
struct gm_sock *igmp;
struct in_addr dst_addr;
@@ -1208,7 +1208,7 @@ static struct gm_sock *igmp_sock_new(int fd, struct in_addr ifaddr,
static void igmp_read_on(struct gm_sock *igmp);
-static void pim_igmp_read(struct thread *t)
+static void pim_igmp_read(struct event *t)
{
uint8_t buf[10000];
struct gm_sock *igmp = (struct gm_sock *)THREAD_ARG(t);
@@ -1300,7 +1300,7 @@ struct gm_sock *pim_igmp_sock_add(struct list *igmp_sock_list,
source records. Source records whose timers are zero (from the
previous EXCLUDE mode) are deleted.
*/
-static void igmp_group_timer(struct thread *t)
+static void igmp_group_timer(struct event *t)
{
struct gm_group *group;
diff --git a/pimd/pim_igmp.h b/pimd/pim_igmp.h
index e275b5b39..a1f19b3c6 100644
--- a/pimd/pim_igmp.h
+++ b/pimd/pim_igmp.h
@@ -64,10 +64,10 @@ struct gm_sock {
pim_addr ifaddr;
time_t sock_creation;
- struct thread *t_igmp_read; /* read: IGMP sockets */
- struct thread
- *t_igmp_query_timer; /* timer: issue IGMP general queries */
- struct thread *t_other_querier_timer; /* timer: other querier present */
+ struct event *t_igmp_read; /* read: IGMP sockets */
+ /* timer: issue IGMP general queries */
+ struct event *t_igmp_query_timer;
+ struct event *t_other_querier_timer; /* timer: other querier present */
pim_addr querier_addr; /* IP address of the querier */
int querier_query_interval; /* QQI */
int querier_robustness_variable; /* QRV */
@@ -144,7 +144,7 @@ static inline void pim_igmp_other_querier_timer_off(struct gm_sock *igmp)
struct gm_source {
pim_addr source_addr;
- struct thread *t_source_timer;
+ struct event *t_source_timer;
struct gm_group *source_group; /* back pointer */
time_t source_creation;
uint32_t source_flags;
@@ -165,11 +165,11 @@ struct gm_group {
represents the time for the *filter-mode* of the group to expire and
switch to INCLUDE mode.
*/
- struct thread *t_group_timer;
+ struct event *t_group_timer;
/* Shared between group-specific and
group-and-source-specific retransmissions */
- struct thread *t_group_query_retransmit_timer;
+ struct event *t_group_query_retransmit_timer;
/* Counter exclusive for group-specific retransmissions
(not used by group-and-source-specific retransmissions,
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c
index f10bcaf04..3c7b1fc82 100644
--- a/pimd/pim_igmpv3.c
+++ b/pimd/pim_igmpv3.c
@@ -107,7 +107,7 @@ void igmp_group_reset_gmi(struct gm_group *group)
igmp_group_timer_on(group, group_membership_interval_msec, ifp->name);
}
-static void igmp_source_timer(struct thread *t)
+static void igmp_source_timer(struct event *t)
{
struct gm_source *source;
struct gm_group *group;
@@ -1200,7 +1200,7 @@ static int group_retransmit_sources(struct gm_group *group,
return num_retransmit_sources_left;
}
-static void igmp_group_retransmit(struct thread *t)
+static void igmp_group_retransmit(struct event *t)
{
struct gm_group *group;
int num_retransmit_sources_left;
diff --git a/pimd/pim_instance.h b/pimd/pim_instance.h
index fa90e38a1..27a58c5b2 100644
--- a/pimd/pim_instance.h
+++ b/pimd/pim_instance.h
@@ -92,7 +92,7 @@ struct pim_router {
/* Holds the client data(unencoded) that need to be pushed to MCLAGD*/
struct stream_fifo *mlag_fifo;
struct stream *mlag_stream;
- struct thread *zpthread_mlag_write;
+ struct event *zpthread_mlag_write;
struct in_addr anycast_vtep_ip;
struct in_addr local_vtep_ip;
struct pim_mlag_stats mlag_stats;
@@ -120,7 +120,7 @@ struct pim_instance {
int send_v6_secondary;
- struct thread *thread;
+ struct event *thread;
int mroute_socket;
int reg_sock; /* Socket to send register msg */
int64_t mroute_socket_creation;
@@ -157,7 +157,7 @@ struct pim_instance {
unsigned int gm_socket_if_count;
int gm_socket;
- struct thread *t_gm_recv;
+ struct event *t_gm_recv;
unsigned int gm_group_count;
unsigned int gm_watermark_limit;
@@ -176,7 +176,7 @@ struct pim_instance {
uint64_t bsm_dropped;
/* If we need to rescan all our upstreams */
- struct thread *rpf_cache_refresher;
+ struct event *rpf_cache_refresher;
int64_t rpf_cache_refresh_requests;
int64_t rpf_cache_refresh_events;
int64_t rpf_cache_refresh_last;
diff --git a/pimd/pim_mlag.c b/pimd/pim_mlag.c
index 61cf2860f..be42cc996 100644
--- a/pimd/pim_mlag.c
+++ b/pimd/pim_mlag.c
@@ -921,7 +921,7 @@ int pim_zebra_mlag_process_down(ZAPI_CALLBACK_ARGS)
return 0;
}
-static void pim_mlag_register_handler(struct thread *thread)
+static void pim_mlag_register_handler(struct event *thread)
{
uint32_t bit_mask = 0;
@@ -956,7 +956,7 @@ void pim_mlag_register(void)
NULL);
}
-static void pim_mlag_deregister_handler(struct thread *thread)
+static void pim_mlag_deregister_handler(struct event *thread)
{
if (!zclient)
return;
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c
index adf0540f6..56d127eb4 100644
--- a/pimd/pim_mroute.c
+++ b/pimd/pim_mroute.c
@@ -767,7 +767,7 @@ int pim_mroute_msg(struct pim_instance *pim, const char *buf, size_t buf_size,
return 0;
}
-static void mroute_read(struct thread *t)
+static void mroute_read(struct event *t)
{
struct pim_instance *pim;
static long long count;
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c
index b3d30defe..bb9096b45 100644
--- a/pimd/pim_msdp.c
+++ b/pimd/pim_msdp.c
@@ -54,7 +54,7 @@ static void pim_msdp_sa_timer_expiry_log(struct pim_msdp_sa *sa,
}
/* RFC-3618:Sec-5.1 - global active source advertisement timer */
-static void pim_msdp_sa_adv_timer_cb(struct thread *t)
+static void pim_msdp_sa_adv_timer_cb(struct event *t)
{
struct pim_instance *pim = THREAD_ARG(t);
@@ -77,7 +77,7 @@ static void pim_msdp_sa_adv_timer_setup(struct pim_instance *pim, bool start)
}
/* RFC-3618:Sec-5.3 - SA cache state timer */
-static void pim_msdp_sa_state_timer_cb(struct thread *t)
+static void pim_msdp_sa_state_timer_cb(struct event *t)
{
struct pim_msdp_sa *sa;
@@ -861,7 +861,7 @@ static void pim_msdp_peer_timer_expiry_log(struct pim_msdp_peer *mp,
}
/* RFC-3618:Sec-5.4 - peer hold timer */
-static void pim_msdp_peer_hold_timer_cb(struct thread *t)
+static void pim_msdp_peer_hold_timer_cb(struct event *t)
{
struct pim_msdp_peer *mp;
@@ -893,7 +893,7 @@ static void pim_msdp_peer_hold_timer_setup(struct pim_msdp_peer *mp, bool start)
/* RFC-3618:Sec-5.5 - peer keepalive timer */
-static void pim_msdp_peer_ka_timer_cb(struct thread *t)
+static void pim_msdp_peer_ka_timer_cb(struct event *t)
{
struct pim_msdp_peer *mp;
@@ -954,7 +954,7 @@ static void pim_msdp_peer_active_connect(struct pim_msdp_peer *mp)
}
/* RFC-3618:Sec-5.6 - connection retry on active peer */
-static void pim_msdp_peer_cr_timer_cb(struct thread *t)
+static void pim_msdp_peer_cr_timer_cb(struct event *t)
{
struct pim_msdp_peer *mp;
diff --git a/pimd/pim_msdp.h b/pimd/pim_msdp.h
index f0a03f076..a4f9de0eb 100644
--- a/pimd/pim_msdp.h
+++ b/pimd/pim_msdp.h
@@ -74,7 +74,7 @@ struct pim_msdp_sa {
/* rfc-3618 is missing default value for SA-hold-down-Period. pulled
* this number from industry-standards */
#define PIM_MSDP_SA_HOLD_TIME ((3*60)+30)
- struct thread *sa_state_timer; // 5.6
+ struct event *sa_state_timer; // 5.6
int64_t uptime;
struct pim_upstream *up;
@@ -109,18 +109,18 @@ struct pim_msdp_peer {
/* protocol timers */
#define PIM_MSDP_PEER_HOLD_TIME 75
- struct thread *hold_timer; // 5.4
+ struct event *hold_timer; // 5.4
#define PIM_MSDP_PEER_KA_TIME 60
- struct thread *ka_timer; // 5.5
+ struct event *ka_timer; // 5.5
#define PIM_MSDP_PEER_CONNECT_RETRY_TIME 30
- struct thread *cr_timer; // 5.6
+ struct event *cr_timer; // 5.6
/* packet thread and buffers */
uint32_t packet_size;
struct stream *ibuf;
struct stream_fifo *obuf;
- struct thread *t_read;
- struct thread *t_write;
+ struct event *t_read;
+ struct event *t_write;
/* stats */
uint32_t conn_attempts;
@@ -167,7 +167,7 @@ enum pim_msdp_flags {
struct pim_msdp_listener {
int fd;
union sockunion su;
- struct thread *thread;
+ struct event *thread;
};
struct pim_msdp {
@@ -182,7 +182,7 @@ struct pim_msdp {
/* MSDP active-source info */
#define PIM_MSDP_SA_ADVERTISMENT_TIME 60
- struct thread *sa_adv_timer; // 5.6
+ struct event *sa_adv_timer; // 5.6
struct hash *sa_hash;
struct list *sa_list;
uint32_t local_cnt;
@@ -227,7 +227,7 @@ void pim_msdp_peer_established(struct pim_msdp_peer *mp);
void pim_msdp_peer_pkt_rxed(struct pim_msdp_peer *mp);
void pim_msdp_peer_stop_tcp_conn(struct pim_msdp_peer *mp, bool chg_state);
void pim_msdp_peer_reset_tcp_conn(struct pim_msdp_peer *mp, const char *rc_str);
-void pim_msdp_write(struct thread *thread);
+void pim_msdp_write(struct event *thread);
int pim_msdp_config_write(struct pim_instance *pim, struct vty *vty,
const char *spaces);
bool pim_msdp_peer_config_write(struct vty *vty, struct pim_instance *pim,
diff --git a/pimd/pim_msdp_packet.c b/pimd/pim_msdp_packet.c
index c3dd07696..959aec0c7 100644
--- a/pimd/pim_msdp_packet.c
+++ b/pimd/pim_msdp_packet.c
@@ -190,7 +190,7 @@ static void pim_msdp_write_proceed_actions(struct pim_msdp_peer *mp)
}
}
-void pim_msdp_write(struct thread *thread)
+void pim_msdp_write(struct event *thread)
{
struct pim_msdp_peer *mp;
struct stream *s;
@@ -686,7 +686,7 @@ static int pim_msdp_read_packet(struct pim_msdp_peer *mp)
return 0;
}
-void pim_msdp_read(struct thread *thread)
+void pim_msdp_read(struct event *thread)
{
struct pim_msdp_peer *mp;
int rc;
diff --git a/pimd/pim_msdp_packet.h b/pimd/pim_msdp_packet.h
index efb14cdf7..1584a2453 100644
--- a/pimd/pim_msdp_packet.h
+++ b/pimd/pim_msdp_packet.h
@@ -51,7 +51,7 @@
#define PIM_MSDP_PKT_TYPE_STRLEN 16
void pim_msdp_pkt_ka_tx(struct pim_msdp_peer *mp);
-void pim_msdp_read(struct thread *thread);
+void pim_msdp_read(struct event *thread);
void pim_msdp_pkt_sa_tx(struct pim_instance *pim);
void pim_msdp_pkt_sa_tx_one(struct pim_msdp_sa *sa);
void pim_msdp_pkt_sa_tx_to_one_peer(struct pim_msdp_peer *mp);
diff --git a/pimd/pim_msdp_socket.c b/pimd/pim_msdp_socket.c
index 3bf6b1d74..97552e2b8 100644
--- a/pimd/pim_msdp_socket.c
+++ b/pimd/pim_msdp_socket.c
@@ -50,7 +50,7 @@ static void pim_msdp_update_sock_send_buffer_size(int fd)
}
/* passive peer socket accept */
-static void pim_msdp_sock_accept(struct thread *thread)
+static void pim_msdp_sock_accept(struct event *thread)
{
union sockunion su;
struct pim_instance *pim = THREAD_ARG(thread);
diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c
index 0b7ea0ad9..19e3b78d6 100644
--- a/pimd/pim_neighbor.c
+++ b/pimd/pim_neighbor.c
@@ -188,7 +188,7 @@ static void update_dr_priority(struct pim_neighbor *neigh,
}
}
-static void on_neighbor_timer(struct thread *t)
+static void on_neighbor_timer(struct event *t)
{
struct pim_neighbor *neigh;
struct interface *ifp;
@@ -238,7 +238,7 @@ void pim_neighbor_timer_reset(struct pim_neighbor *neigh, uint16_t holdtime)
neigh->holdtime, &neigh->t_expire_timer);
}
-static void on_neighbor_jp_timer(struct thread *t)
+static void on_neighbor_jp_timer(struct event *t)
{
struct pim_neighbor *neigh = THREAD_ARG(t);
struct pim_rpf rpf;
diff --git a/pimd/pim_neighbor.h b/pimd/pim_neighbor.h
index f7375745a..69e9976de 100644
--- a/pimd/pim_neighbor.h
+++ b/pimd/pim_neighbor.h
@@ -27,10 +27,10 @@ struct pim_neighbor {
uint32_t dr_priority;
uint32_t generation_id;
struct list *prefix_list; /* list of struct prefix */
- struct thread *t_expire_timer;
+ struct event *t_expire_timer;
struct interface *interface;
- struct thread *jp_timer;
+ struct event *jp_timer;
struct list *upstream_jp_agg;
struct bfd_session_params *bfd_session;
};
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c
index 697266e2b..2c3134473 100644
--- a/pimd/pim_pim.c
+++ b/pimd/pim_pim.c
@@ -31,7 +31,7 @@
#include "pim_bsm.h"
#include <lib/lib_errors.h>
-static void on_pim_hello_send(struct thread *t);
+static void on_pim_hello_send(struct event *t);
static const char *pim_pim_msgtype2str(enum pim_msg_type type)
{
@@ -334,7 +334,7 @@ int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len,
static void pim_sock_read_on(struct interface *ifp);
-static void pim_sock_read(struct thread *t)
+static void pim_sock_read(struct event *t)
{
struct interface *ifp, *orig_ifp;
struct pim_interface *pim_ifp;
@@ -830,7 +830,7 @@ static void hello_resched(struct interface *ifp)
/*
Periodic hello timer
*/
-static void on_pim_hello_send(struct thread *t)
+static void on_pim_hello_send(struct event *t)
{
struct pim_interface *pim_ifp;
struct interface *ifp;
diff --git a/pimd/pim_register.c b/pimd/pim_register.c
index 42b013815..522381737 100644
--- a/pimd/pim_register.c
+++ b/pimd/pim_register.c
@@ -32,7 +32,7 @@
#include "pim_vxlan.h"
#include "pim_addr.h"
-struct thread *send_test_packet_timer = NULL;
+struct event *send_test_packet_timer = NULL;
void pim_register_join(struct pim_upstream *up)
{
diff --git a/pimd/pim_ssmpingd.c b/pimd/pim_ssmpingd.c
index 2fc30b491..2947dd05f 100644
--- a/pimd/pim_ssmpingd.c
+++ b/pimd/pim_ssmpingd.c
@@ -286,7 +286,7 @@ static int ssmpingd_read_msg(struct ssmpingd_sock *ss)
return 0;
}
-static void ssmpingd_sock_read(struct thread *t)
+static void ssmpingd_sock_read(struct event *t)
{
struct ssmpingd_sock *ss;
diff --git a/pimd/pim_ssmpingd.h b/pimd/pim_ssmpingd.h
index fe1583979..71286e496 100644
--- a/pimd/pim_ssmpingd.h
+++ b/pimd/pim_ssmpingd.h
@@ -17,7 +17,7 @@ struct ssmpingd_sock {
struct pim_instance *pim;
int sock_fd; /* socket */
- struct thread *t_sock_read; /* thread for reading socket */
+ struct event *t_sock_read; /* thread for reading socket */
pim_addr source_addr; /* source address */
int64_t creation; /* timestamp of socket creation */
int64_t requests; /* counter */
diff --git a/pimd/pim_time.c b/pimd/pim_time.c
index 3f3d67f59..23f800cf8 100644
--- a/pimd/pim_time.c
+++ b/pimd/pim_time.c
@@ -121,7 +121,7 @@ static int pim_time_hhmmss(char *buf, int buf_size, long sec)
return wr != 8;
}
-void pim_time_timer_to_mmss(char *buf, int buf_size, struct thread *t_timer)
+void pim_time_timer_to_mmss(char *buf, int buf_size, struct event *t_timer)
{
if (t_timer) {
pim_time_mmss(buf, buf_size,
@@ -131,7 +131,7 @@ void pim_time_timer_to_mmss(char *buf, int buf_size, struct thread *t_timer)
}
}
-void pim_time_timer_to_hhmmss(char *buf, int buf_size, struct thread *t_timer)
+void pim_time_timer_to_hhmmss(char *buf, int buf_size, struct event *t_timer)
{
if (t_timer) {
pim_time_hhmmss(buf, buf_size,
@@ -156,7 +156,7 @@ void pim_time_uptime_begin(char *buf, int buf_size, int64_t now, int64_t begin)
snprintf(buf, buf_size, "--:--:--");
}
-long pim_time_timer_remain_msec(struct thread *t_timer)
+long pim_time_timer_remain_msec(struct event *t_timer)
{
/* no timer thread running means timer has expired: return 0 */
diff --git a/pimd/pim_time.h b/pimd/pim_time.h
index a0707407e..47f2bc8b7 100644
--- a/pimd/pim_time.h
+++ b/pimd/pim_time.h
@@ -16,10 +16,10 @@ int64_t pim_time_monotonic_sec(void);
int64_t pim_time_monotonic_dsec(void);
int64_t pim_time_monotonic_usec(void);
int pim_time_mmss(char *buf, int buf_size, long sec);
-void pim_time_timer_to_mmss(char *buf, int buf_size, struct thread *t);
-void pim_time_timer_to_hhmmss(char *buf, int buf_size, struct thread *t);
+void pim_time_timer_to_mmss(char *buf, int buf_size, struct event *t);
+void pim_time_timer_to_hhmmss(char *buf, int buf_size, struct event *t);
void pim_time_uptime(char *buf, int buf_size, int64_t uptime_sec);
void pim_time_uptime_begin(char *buf, int buf_size, int64_t now, int64_t begin);
-long pim_time_timer_remain_msec(struct thread *t_timer);
+long pim_time_timer_remain_msec(struct event *t_timer);
#endif /* PIM_TIME_H */
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c
index 1ee044197..94d7b3172 100644
--- a/pimd/pim_upstream.c
+++ b/pimd/pim_upstream.c
@@ -289,7 +289,7 @@ void pim_upstream_send_join(struct pim_upstream *up)
pim_jp_agg_single_upstream_send(&up->rpf, up, 1 /* join */);
}
-static void on_join_timer(struct thread *t)
+static void on_join_timer(struct event *t)
{
struct pim_upstream *up;
@@ -1461,7 +1461,7 @@ struct pim_upstream *pim_upstream_keep_alive_timer_proc(
return up;
}
-static void pim_upstream_keep_alive_timer(struct thread *t)
+static void pim_upstream_keep_alive_timer(struct event *t)
{
struct pim_upstream *up;
@@ -1494,7 +1494,7 @@ void pim_upstream_keep_alive_timer_start(struct pim_upstream *up, uint32_t time)
}
/* MSDP on RP needs to know if a source is registerable to this RP */
-static void pim_upstream_msdp_reg_timer(struct thread *t)
+static void pim_upstream_msdp_reg_timer(struct event *t)
{
struct pim_upstream *up = THREAD_ARG(t);
struct pim_instance *pim = up->channel_oil->pim;
@@ -1680,7 +1680,7 @@ const char *pim_reg_state2str(enum pim_reg_state reg_state, char *state_str,
return state_str;
}
-static void pim_upstream_register_stop_timer(struct thread *t)
+static void pim_upstream_register_stop_timer(struct event *t)
{
struct pim_interface *pim_ifp;
struct pim_instance *pim;
diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h
index 890ba7d16..4e0926e29 100644
--- a/pimd/pim_upstream.h
+++ b/pimd/pim_upstream.h
@@ -237,19 +237,19 @@ struct pim_upstream {
struct pim_up_mlag mlag;
- struct thread *t_join_timer;
+ struct event *t_join_timer;
/*
* RST(S,G)
*/
- struct thread *t_rs_timer;
+ struct event *t_rs_timer;
#define PIM_REGISTER_SUPPRESSION_PERIOD (60)
#define PIM_REGISTER_PROBE_PERIOD (5)
/*
* KAT(S,G)
*/
- struct thread *t_ka_timer;
+ struct event *t_ka_timer;
#define PIM_KEEPALIVE_PERIOD (210)
#define PIM_RP_KEEPALIVE_PERIOD \
(3 * router->register_suppress_time + router->register_probe_time)
@@ -257,7 +257,7 @@ struct pim_upstream {
/* on the RP we restart a timer to indicate if registers are being rxed
* for
* SG. This is needed by MSDP to determine its local SA cache */
- struct thread *t_msdp_reg_timer;
+ struct event *t_msdp_reg_timer;
#define PIM_MSDP_REG_RXED_PERIOD (3 * (1.5 * router->register_suppress_time))
int64_t state_transition; /* Record current state uptime */
diff --git a/pimd/pim_vxlan.c b/pimd/pim_vxlan.c
index 91ec9d69a..995c14edd 100644
--- a/pimd/pim_vxlan.c
+++ b/pimd/pim_vxlan.c
@@ -169,7 +169,7 @@ void pim_vxlan_update_sg_reg_state(struct pim_instance *pim,
pim_vxlan_del_work(vxlan_sg);
}
-static void pim_vxlan_work_timer_cb(struct thread *t)
+static void pim_vxlan_work_timer_cb(struct event *t)
{
pim_vxlan_do_reg_work();
pim_vxlan_work_timer_setup(true /* start */);
diff --git a/pimd/pim_vxlan.h b/pimd/pim_vxlan.h
index 6e1e066f0..9a135ca6b 100644
--- a/pimd/pim_vxlan.h
+++ b/pimd/pim_vxlan.h
@@ -75,7 +75,7 @@ enum pim_vxlan_flags {
struct pim_vxlan {
enum pim_vxlan_flags flags;
- struct thread *work_timer;
+ struct event *work_timer;
struct list *work_list;
struct listnode *next_work;
int max_work_cnt;
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index 29aac7f1c..e201d5068 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -385,7 +385,7 @@ void pim_scan_oil(struct pim_instance *pim)
pim_upstream_mroute_iif_update(c_oil, __func__);
}
-static void on_rpf_cache_refresh(struct thread *t)
+static void on_rpf_cache_refresh(struct event *t)
{
struct pim_instance *pim = THREAD_ARG(t);
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c
index 5f574eb5b..56d5ae8c6 100644
--- a/pimd/pim_zlookup.c
+++ b/pimd/pim_zlookup.c
@@ -27,13 +27,13 @@
#include "pim_addr.h"
static struct zclient *zlookup = NULL;
-struct thread *zlookup_read;
+struct event *zlookup_read;
static void zclient_lookup_sched(struct zclient *zlookup, int delay);
-static void zclient_lookup_read_pipe(struct thread *thread);
+static void zclient_lookup_read_pipe(struct event *thread);
/* Connect to zebra for nexthop lookup. */
-static void zclient_lookup_connect(struct thread *t)
+static void zclient_lookup_connect(struct event *t)
{
struct zclient *zlookup;
@@ -364,7 +364,7 @@ static int zclient_lookup_nexthop_once(struct pim_instance *pim,
return zclient_read_nexthop(pim, zlookup, nexthop_tab, tab_size, addr);
}
-void zclient_lookup_read_pipe(struct thread *thread)
+void zclient_lookup_read_pipe(struct event *thread)
{
struct zclient *zlookup = THREAD_ARG(thread);
struct pim_instance *pim = pim_get_pim_instance(VRF_DEFAULT);
diff --git a/pimd/pim_zpthread.c b/pimd/pim_zpthread.c
index bc515f27e..afa789663 100644
--- a/pimd/pim_zpthread.c
+++ b/pimd/pim_zpthread.c
@@ -133,7 +133,7 @@ static void pim_mlag_zebra_check_for_buffer_flush(uint32_t curr_msg_type,
* Thsi thread reads the clients data from the Gloabl queue and encodes with
* protobuf and pass on to the MLAG socket.
*/
-static void pim_mlag_zthread_handler(struct thread *event)
+static void pim_mlag_zthread_handler(struct event *event)
{
struct stream *read_s;
uint32_t wr_count = 0;
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index 309c18f9c..a32913766 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -774,7 +774,7 @@ int rip_enable_if_delete(struct rip *rip, const char *ifname)
}
/* Join to multicast group and send request to the interface. */
-static void rip_interface_wakeup(struct thread *t)
+static void rip_interface_wakeup(struct event *t)
{
struct interface *ifp;
struct rip_interface *ri;
diff --git a/ripd/rip_peer.c b/ripd/rip_peer.c
index 85cd97150..88094e983 100644
--- a/ripd/rip_peer.c
+++ b/ripd/rip_peer.c
@@ -52,7 +52,7 @@ struct rip_peer *rip_peer_lookup_next(struct rip *rip, struct in_addr *addr)
}
/* RIP peer is timeout. */
-static void rip_peer_timeout(struct thread *t)
+static void rip_peer_timeout(struct event *t)
{
struct rip_peer *peer;
diff --git a/ripd/ripd.c b/ripd/ripd.c
index 8b21af92f..8cc339e7c 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -50,7 +50,7 @@ DEFINE_MTYPE_STATIC(RIPD, RIP_DISTANCE, "RIP distance");
/* Prototypes. */
static void rip_output_process(struct connected *, struct sockaddr_in *, int,
uint8_t);
-static void rip_triggered_update(struct thread *);
+static void rip_triggered_update(struct event *);
static int rip_update_jitter(unsigned long);
static void rip_distance_table_node_cleanup(struct route_table *table,
struct route_node *node);
@@ -121,7 +121,7 @@ struct rip *rip_info_get_instance(const struct rip_info *rinfo)
}
/* RIP route garbage collect timer. */
-static void rip_garbage_collect(struct thread *t)
+static void rip_garbage_collect(struct event *t)
{
struct rip_info *rinfo;
struct route_node *rp;
@@ -287,7 +287,7 @@ struct rip_info *rip_ecmp_delete(struct rip *rip, struct rip_info *rinfo)
}
/* Timeout RIP routes. */
-static void rip_timeout(struct thread *t)
+static void rip_timeout(struct event *t)
{
struct rip_info *rinfo = THREAD_ARG(t);
struct rip *rip = rip_info_get_instance(rinfo);
@@ -1697,7 +1697,7 @@ static void rip_request_process(struct rip_packet *packet, int size,
}
/* First entry point of RIP packet. */
-static void rip_read(struct thread *t)
+static void rip_read(struct event *t)
{
struct rip *rip = THREAD_ARG(t);
int sock;
@@ -2478,7 +2478,7 @@ static void rip_update_process(struct rip *rip, int route_type)
}
/* RIP's periodical timer. */
-static void rip_update(struct thread *t)
+static void rip_update(struct event *t)
{
struct rip *rip = THREAD_ARG(t);
@@ -2520,7 +2520,7 @@ static void rip_clear_changed_flag(struct rip *rip)
}
/* Triggered update interval timer. */
-static void rip_triggered_interval(struct thread *t)
+static void rip_triggered_interval(struct event *t)
{
struct rip *rip = THREAD_ARG(t);
@@ -2531,7 +2531,7 @@ static void rip_triggered_interval(struct thread *t)
}
/* Execute triggered update. */
-static void rip_triggered_update(struct thread *t)
+static void rip_triggered_update(struct event *t)
{
struct rip *rip = THREAD_ARG(t);
int interval;
@@ -2923,7 +2923,7 @@ static void rip_vty_out_uptime(struct vty *vty, struct rip_info *rinfo)
struct tm tm;
#define TIME_BUF 25
char timebuf[TIME_BUF];
- struct thread *thread;
+ struct event *thread;
if ((thread = rinfo->t_timeout) != NULL) {
clock = thread_timer_remain_second(thread);
diff --git a/ripd/ripd.h b/ripd/ripd.h
index 4894cb863..b987ee1a4 100644
--- a/ripd/ripd.h
+++ b/ripd/ripd.h
@@ -117,15 +117,15 @@ struct rip {
struct list *peer_list;
/* RIP threads. */
- struct thread *t_read;
+ struct event *t_read;
/* Update and garbage timer. */
- struct thread *t_update;
+ struct event *t_update;
/* Triggered update hack. */
int trigger;
- struct thread *t_triggered_update;
- struct thread *t_triggered_interval;
+ struct event *t_triggered_update;
+ struct event *t_triggered_interval;
/* RIP timer values. */
uint32_t update_time;
@@ -239,8 +239,8 @@ struct rip_info {
uint8_t flags;
/* Garbage collect timer. */
- struct thread *t_timeout;
- struct thread *t_garbage_collect;
+ struct event *t_timeout;
+ struct event *t_garbage_collect;
/* Route-map futures - this variables can be changed. */
struct in_addr nexthop_out;
@@ -309,7 +309,7 @@ struct rip_interface {
struct route_map *routemap[RIP_FILTER_MAX];
/* Wake up thread. */
- struct thread *t_wakeup;
+ struct event *t_wakeup;
/* Interface statistics. */
int recv_badpackets;
@@ -342,7 +342,7 @@ struct rip_peer {
int recv_badroutes;
/* Timeout thread. */
- struct thread *t_timeout;
+ struct event *t_timeout;
};
struct rip_distance {
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index 919f3c81d..139afca7d 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -586,7 +586,7 @@ int ripng_enable_if_delete(struct ripng *ripng, const char *ifname)
}
/* Wake up interface. */
-static void ripng_interface_wakeup(struct thread *t)
+static void ripng_interface_wakeup(struct event *t)
{
struct interface *ifp;
struct ripng_interface *ri;
diff --git a/ripngd/ripng_peer.c b/ripngd/ripng_peer.c
index 30b11aa14..dda10d1ce 100644
--- a/ripngd/ripng_peer.c
+++ b/ripngd/ripng_peer.c
@@ -60,7 +60,7 @@ struct ripng_peer *ripng_peer_lookup_next(struct ripng *ripng,
/* RIPng peer is timeout.
* Garbage collector.
**/
-static void ripng_peer_timeout(struct thread *t)
+static void ripng_peer_timeout(struct event *t)
{
struct ripng_peer *peer;
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 24ff1bcd0..3bf0e3021 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -46,7 +46,7 @@ void ripng_output_process(struct interface *, struct sockaddr_in6 *, int);
static void ripng_instance_enable(struct ripng *ripng, struct vrf *vrf,
int sock);
static void ripng_instance_disable(struct ripng *ripng);
-static void ripng_triggered_update(struct thread *);
+static void ripng_triggered_update(struct event *);
static void ripng_if_rmap_update(struct if_rmap_ctx *ctx,
struct if_rmap *if_rmap);
@@ -408,7 +408,7 @@ static int ripng_lladdr_check(struct interface *ifp, struct in6_addr *addr)
}
/* RIPng route garbage collect timer. */
-static void ripng_garbage_collect(struct thread *t)
+static void ripng_garbage_collect(struct event *t)
{
struct ripng_info *rinfo;
struct agg_node *rp;
@@ -585,7 +585,7 @@ struct ripng_info *ripng_ecmp_delete(struct ripng *ripng,
}
/* Timeout RIPng routes. */
-static void ripng_timeout(struct thread *t)
+static void ripng_timeout(struct event *t)
{
struct ripng_info *rinfo = THREAD_ARG(t);
struct ripng *ripng = ripng_info_get_instance(rinfo);
@@ -1282,7 +1282,7 @@ static void ripng_request_process(struct ripng_packet *packet, int size,
}
/* First entry point of reading RIPng packet. */
-static void ripng_read(struct thread *thread)
+static void ripng_read(struct event *thread)
{
struct ripng *ripng = THREAD_ARG(thread);
int len;
@@ -1390,7 +1390,7 @@ static void ripng_clear_changed_flag(struct ripng *ripng)
/* Regular update of RIPng route. Send all routing formation to RIPng
enabled interface. */
-static void ripng_update(struct thread *t)
+static void ripng_update(struct event *t)
{
struct ripng *ripng = THREAD_ARG(t);
struct interface *ifp;
@@ -1438,7 +1438,7 @@ static void ripng_update(struct thread *t)
}
/* Triggered update interval timer. */
-static void ripng_triggered_interval(struct thread *t)
+static void ripng_triggered_interval(struct event *t)
{
struct ripng *ripng = THREAD_ARG(t);
@@ -1449,7 +1449,7 @@ static void ripng_triggered_interval(struct thread *t)
}
/* Execute triggered update. */
-void ripng_triggered_update(struct thread *t)
+void ripng_triggered_update(struct event *t)
{
struct ripng *ripng = THREAD_ARG(t);
struct interface *ifp;
@@ -1932,7 +1932,7 @@ static void ripng_vty_out_uptime(struct vty *vty, struct ripng_info *rinfo)
struct tm tm;
#define TIME_BUF 25
char timebuf[TIME_BUF];
- struct thread *thread;
+ struct event *thread;
if ((thread = rinfo->t_timeout) != NULL) {
clock = thread_timer_remain_second(thread);
diff --git a/ripngd/ripngd.h b/ripngd/ripngd.h
index 59b948b8f..d5cdfe674 100644
--- a/ripngd/ripngd.h
+++ b/ripngd/ripngd.h
@@ -121,13 +121,13 @@ struct ripng {
struct list *offset_list_master;
/* RIPng threads. */
- struct thread *t_read;
- struct thread *t_update;
+ struct event *t_read;
+ struct event *t_update;
/* Triggered update hack. */
int trigger;
- struct thread *t_triggered_update;
- struct thread *t_triggered_interval;
+ struct event *t_triggered_update;
+ struct event *t_triggered_interval;
/* RIPng ECMP flag */
bool ecmp;
@@ -200,8 +200,8 @@ struct ripng_info {
uint8_t flags;
/* Garbage collect timer. */
- struct thread *t_timeout;
- struct thread *t_garbage_collect;
+ struct event *t_timeout;
+ struct event *t_garbage_collect;
/* Route-map features - this variables can be changed. */
struct in6_addr nexthop_out;
@@ -254,7 +254,7 @@ struct ripng_interface {
uint8_t default_only;
/* Wake up thread. */
- struct thread *t_wakeup;
+ struct event *t_wakeup;
/* Passive interface. */
int passive;
@@ -282,7 +282,7 @@ struct ripng_peer {
int recv_badroutes;
/* Timeout thread. */
- struct thread *t_timeout;
+ struct event *t_timeout;
};
/* All RIPng events. */
diff --git a/sharpd/sharp_logpump.c b/sharpd/sharp_logpump.c
index 9ef9b2d0f..175aca308 100644
--- a/sharpd/sharp_logpump.c
+++ b/sharpd/sharp_logpump.c
@@ -30,7 +30,7 @@ static struct vty *lp_vty;
extern struct thread_master *master;
-static void logpump_done(struct thread *thread)
+static void logpump_done(struct event *thread)
{
double x;
diff --git a/tests/bgpd/test_packet.c b/tests/bgpd/test_packet.c
index aeebbd9a3..da714e353 100644
--- a/tests/bgpd/test_packet.c
+++ b/tests/bgpd/test_packet.c
@@ -41,7 +41,7 @@ int main(int argc, char *argv[])
{
struct peer *peer;
int i, j;
- struct thread t;
+ struct event t;
qobj_init();
bgp_attr_init();
diff --git a/tests/helpers/c/main.c b/tests/helpers/c/main.c
index 209b4ad86..ae089398e 100644
--- a/tests/helpers/c/main.c
+++ b/tests/helpers/c/main.c
@@ -33,7 +33,7 @@ DEFUN (daemon_exit,
}
static int timer_count;
-static void test_timer(struct thread *thread)
+static void test_timer(struct event *thread)
{
int *count = THREAD_ARG(thread);
@@ -82,7 +82,7 @@ int main(int argc, char **argv)
int vty_port = 4000;
int daemon_mode = 0;
char *progname;
- struct thread thread;
+ struct event thread;
char *config_file = NULL;
/* Set umask before anything for security */
diff --git a/tests/isisd/test_isis_spf.c b/tests/isisd/test_isis_spf.c
index 37c22c543..3068ba26d 100644
--- a/tests/isisd/test_isis_spf.c
+++ b/tests/isisd/test_isis_spf.c
@@ -488,7 +488,7 @@ int main(int argc, char **argv)
{
char *p;
char *progname;
- struct thread thread;
+ struct event thread;
bool debug = false;
/* Set umask before anything for security */
diff --git a/tests/lib/cli/common_cli.c b/tests/lib/cli/common_cli.c
index 417038338..350716ad0 100644
--- a/tests/lib/cli/common_cli.c
+++ b/tests/lib/cli/common_cli.c
@@ -52,7 +52,7 @@ int test_log_prio = ZLOG_DISABLED;
/* main routine. */
int main(int argc, char **argv)
{
- struct thread thread;
+ struct event thread;
size_t yangcount;
/* Set umask before anything for security */
diff --git a/tests/lib/northbound/test_oper_data.c b/tests/lib/northbound/test_oper_data.c
index b841fea25..8b1c222ad 100644
--- a/tests/lib/northbound/test_oper_data.c
+++ b/tests/lib/northbound/test_oper_data.c
@@ -361,7 +361,7 @@ static void vty_do_exit(int isexit)
/* main routine. */
int main(int argc, char **argv)
{
- struct thread thread;
+ struct event thread;
unsigned int num_vrfs = 2;
unsigned int num_interfaces = 4;
unsigned int num_routes = 6;
diff --git a/tests/lib/test_grpc.cpp b/tests/lib/test_grpc.cpp
index 187b8091d..b274c3d3a 100644
--- a/tests/lib/test_grpc.cpp
+++ b/tests/lib/test_grpc.cpp
@@ -66,7 +66,7 @@ static const struct frr_yang_module_info *const staticd_yang_modules[] = {
&frr_staticd_info, &frr_vrf_info,
};
-static void grpc_thread_stop(struct thread *thread);
+static void grpc_thread_stop(struct event *thread);
static void _err_print(const void *cookie, const char *errstr)
{
@@ -486,7 +486,7 @@ void *grpc_client_test_start(void *arg)
return NULL;
}
-static void grpc_thread_start(struct thread *thread)
+static void grpc_thread_start(struct event *thread)
{
struct frr_pthread_attr client = {
.start = grpc_client_test_start,
@@ -498,7 +498,7 @@ static void grpc_thread_start(struct thread *thread)
frr_pthread_wait_running(pth);
}
-static void grpc_thread_stop(struct thread *thread)
+static void grpc_thread_stop(struct event *thread)
{
std::cout << __func__ << ": frr_pthread_stop_all" << std::endl;
frr_pthread_stop_all();
@@ -545,7 +545,7 @@ int main(int argc, char **argv)
thread_add_event(master, grpc_thread_start, NULL, 0, NULL);
/* Event Loop */
- struct thread thread;
+ struct event thread;
while (thread_fetch(master, &thread))
thread_call(&thread);
return 0;
diff --git a/tests/lib/test_heavy_thread.c b/tests/lib/test_heavy_thread.c
index 0cee1e863..59da82b2f 100644
--- a/tests/lib/test_heavy_thread.c
+++ b/tests/lib/test_heavy_thread.c
@@ -56,7 +56,7 @@ static void slow_func(struct vty *vty, const char *str, const int i)
printf("%s did %d, x = %g\n", str, i, x);
}
-static void clear_something(struct thread *thread)
+static void clear_something(struct event *thread)
{
struct work_state *ws = THREAD_ARG(thread);
diff --git a/tests/lib/test_segv.c b/tests/lib/test_segv.c
index 8532da7c2..f4a22930b 100644
--- a/tests/lib/test_segv.c
+++ b/tests/lib/test_segv.c
@@ -49,7 +49,7 @@ void func3(void)
func2(6, buf);
}
-static void threadfunc(struct thread *thread)
+static void threadfunc(struct event *thread)
{
func3();
}
diff --git a/tests/lib/test_sig.c b/tests/lib/test_sig.c
index 897e004b4..b72bf6b1f 100644
--- a/tests/lib/test_sig.c
+++ b/tests/lib/test_sig.c
@@ -36,7 +36,7 @@ struct frr_signal_t sigs[] = {{
}};
struct thread_master *master;
-struct thread t;
+struct event t;
int main(void)
{
diff --git a/tests/lib/test_timer_correctness.c b/tests/lib/test_timer_correctness.c
index fa197cd1c..b2e3d8de6 100644
--- a/tests/lib/test_timer_correctness.c
+++ b/tests/lib/test_timer_correctness.c
@@ -35,7 +35,7 @@ static char *expected_buf;
static struct prng *prng;
-static struct thread **timers;
+static struct event **timers;
static int timers_pending;
@@ -63,7 +63,7 @@ static void terminate_test(void)
exit(exit_code);
}
-static void timer_func(struct thread *thread)
+static void timer_func(struct event *thread)
{
int rv;
@@ -94,7 +94,7 @@ static int cmp_timeval(const void *a, const void *b)
int main(int argc, char **argv)
{
int i, j;
- struct thread t;
+ struct event t;
struct timeval **alarms;
master = thread_master_create(NULL);
diff --git a/tests/lib/test_timer_performance.c b/tests/lib/test_timer_performance.c
index 5af0604d1..d4cd65380 100644
--- a/tests/lib/test_timer_performance.c
+++ b/tests/lib/test_timer_performance.c
@@ -22,7 +22,7 @@
struct thread_master *master;
-static void dummy_func(struct thread *thread)
+static void dummy_func(struct event *thread)
{
}
@@ -30,7 +30,7 @@ int main(int argc, char **argv)
{
struct prng *prng;
int i;
- struct thread **timers;
+ struct event **timers;
struct timeval tv_start, tv_lap, tv_stop;
unsigned long t_schedule, t_remove;
diff --git a/tests/lib/test_zmq.c b/tests/lib/test_zmq.c
index 59a596e1c..836819c54 100644
--- a/tests/lib/test_zmq.c
+++ b/tests/lib/test_zmq.c
@@ -264,7 +264,7 @@ static void run_server(int syncfd)
{
void *zmqsock;
char dummy = 0;
- struct thread t;
+ struct event t;
master = thread_master_create(NULL);
signal_init(master, array_size(sigs), sigs);
diff --git a/tests/ospfd/test_ospf_spf.c b/tests/ospfd/test_ospf_spf.c
index d40b37b92..ebd8db736 100644
--- a/tests/ospfd/test_ospf_spf.c
+++ b/tests/ospfd/test_ospf_spf.c
@@ -240,7 +240,7 @@ int main(int argc, char **argv)
{
char *p;
char *progname;
- struct thread thread;
+ struct event thread;
bool debug = false;
/* Set umask before anything for security */
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c
index 1d934f616..19d53c1a1 100644
--- a/vrrpd/vrrp.c
+++ b/vrrpd/vrrp.c
@@ -673,8 +673,8 @@ struct vrrp_vrouter *vrrp_lookup(const struct interface *ifp, uint8_t vrid)
/* Forward decls */
static void vrrp_change_state(struct vrrp_router *r, int to);
-static void vrrp_adver_timer_expire(struct thread *thread);
-static void vrrp_master_down_timer_expire(struct thread *thread);
+static void vrrp_adver_timer_expire(struct event *thread);
+static void vrrp_master_down_timer_expire(struct event *thread);
/*
* Finds the first connected address of the appropriate family on a VRRP
@@ -976,7 +976,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src,
/*
* Read and process next IPvX datagram.
*/
-static void vrrp_read(struct thread *thread)
+static void vrrp_read(struct event *thread)
{
struct vrrp_router *r = THREAD_ARG(thread);
@@ -1473,7 +1473,7 @@ static void vrrp_change_state(struct vrrp_router *r, int to)
/*
* Called when Adver_Timer expires.
*/
-static void vrrp_adver_timer_expire(struct thread *thread)
+static void vrrp_adver_timer_expire(struct event *thread)
{
struct vrrp_router *r = THREAD_ARG(thread);
@@ -1501,7 +1501,7 @@ static void vrrp_adver_timer_expire(struct thread *thread)
/*
* Called when Master_Down_Timer expires.
*/
-static void vrrp_master_down_timer_expire(struct thread *thread)
+static void vrrp_master_down_timer_expire(struct event *thread)
{
struct vrrp_router *r = THREAD_ARG(thread);
diff --git a/vrrpd/vrrp.h b/vrrpd/vrrp.h
index 5cdba8677..767019033 100644
--- a/vrrpd/vrrp.h
+++ b/vrrpd/vrrp.h
@@ -193,10 +193,10 @@ struct vrrp_router {
uint32_t trans_cnt;
} stats;
- struct thread *t_master_down_timer;
- struct thread *t_adver_timer;
- struct thread *t_read;
- struct thread *t_write;
+ struct event *t_master_down_timer;
+ struct event *t_adver_timer;
+ struct event *t_read;
+ struct event *t_write;
};
/*
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 50970f26c..dd737dd0a 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -57,7 +57,7 @@ struct vtysh_client {
char path[MAXPATHLEN];
struct vtysh_client *next;
- struct thread *log_reader;
+ struct event *log_reader;
int log_fd;
uint32_t lost_msgs;
};
@@ -3728,7 +3728,7 @@ static void vtysh_log_print(struct vtysh_client *vclient,
text + textpos);
}
-static void vtysh_log_read(struct thread *thread)
+static void vtysh_log_read(struct event *thread)
{
struct vtysh_client *vclient = THREAD_ARG(thread);
struct {
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index 25b667252..801955549 100644
--- a/vtysh/vtysh_main.c
+++ b/vtysh/vtysh_main.c
@@ -214,9 +214,9 @@ struct option longopts[] = {
bool vtysh_loop_exited;
-static struct thread *vtysh_rl_read_thread;
+static struct event *vtysh_rl_read_thread;
-static void vtysh_rl_read(struct thread *thread)
+static void vtysh_rl_read(struct event *thread)
{
thread_add_read(master, vtysh_rl_read, NULL, STDIN_FILENO,
&vtysh_rl_read_thread);
@@ -226,7 +226,7 @@ static void vtysh_rl_read(struct thread *thread)
/* Read a string, and return a pointer to it. Returns NULL on EOF. */
static void vtysh_rl_run(void)
{
- struct thread thread;
+ struct event thread;
master = thread_master_create(NULL);
diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c
index eb32cc966..4ded379ef 100644
--- a/watchfrr/watchfrr.c
+++ b/watchfrr/watchfrr.c
@@ -86,15 +86,15 @@ struct restart_info {
pid_t pid;
struct timeval time;
long interval;
- struct thread *t_kill;
+ struct event *t_kill;
int kills;
};
static struct global_state {
enum restart_phase phase;
- struct thread *t_phase_hanging;
- struct thread *t_startup_timeout;
- struct thread *t_operational;
+ struct event *t_phase_hanging;
+ struct event *t_startup_timeout;
+ struct event *t_operational;
const char *vtydir;
long period;
long timeout;
@@ -149,9 +149,9 @@ struct daemon {
int fd;
struct timeval echo_sent;
unsigned int connect_tries;
- struct thread *t_wakeup;
- struct thread *t_read;
- struct thread *t_write;
+ struct event *t_wakeup;
+ struct event *t_read;
+ struct event *t_write;
struct daemon *next;
struct restart_info restart;
@@ -195,7 +195,7 @@ static const struct option longopts[] = {
{NULL, 0, NULL, 0}};
static int try_connect(struct daemon *dmn);
-static void wakeup_send_echo(struct thread *t_wakeup);
+static void wakeup_send_echo(struct event *t_wakeup);
static void try_restart(struct daemon *dmn);
static void phase_check(void);
static void restart_done(struct daemon *dmn);
@@ -347,7 +347,7 @@ static struct timeval *time_elapsed(struct timeval *result,
return result;
}
-static void restart_kill(struct thread *t_kill)
+static void restart_kill(struct event *t_kill)
{
struct restart_info *restart = THREAD_ARG(t_kill);
struct timeval delay;
@@ -554,7 +554,7 @@ static int run_job(struct restart_info *restart, const char *cmdtype,
FUZZY(gs.period), &(DMN)->t_wakeup); \
} while (0);
-static void wakeup_down(struct thread *t_wakeup)
+static void wakeup_down(struct event *t_wakeup)
{
struct daemon *dmn = THREAD_ARG(t_wakeup);
@@ -565,7 +565,7 @@ static void wakeup_down(struct thread *t_wakeup)
try_restart(dmn);
}
-static void wakeup_init(struct thread *t_wakeup)
+static void wakeup_init(struct event *t_wakeup)
{
struct daemon *dmn = THREAD_ARG(t_wakeup);
@@ -593,7 +593,7 @@ static void restart_done(struct daemon *dmn)
SET_WAKEUP_DOWN(dmn);
}
-static void daemon_restarting_operational(struct thread *thread)
+static void daemon_restarting_operational(struct event *thread)
{
systemd_send_status("FRR Operational");
}
@@ -622,7 +622,7 @@ static void daemon_down(struct daemon *dmn, const char *why)
phase_check();
}
-static void handle_read(struct thread *t_read)
+static void handle_read(struct event *t_read)
{
struct daemon *dmn = THREAD_ARG(t_read);
static const char resp[sizeof(PING_TOKEN) + 4] = PING_TOKEN "\n";
@@ -750,7 +750,7 @@ static void daemon_up(struct daemon *dmn, const char *why)
phase_check();
}
-static void check_connect(struct thread *t_write)
+static void check_connect(struct event *t_write)
{
struct daemon *dmn = THREAD_ARG(t_write);
int sockerr;
@@ -778,7 +778,7 @@ static void check_connect(struct thread *t_write)
daemon_up(dmn, "delayed connect succeeded");
}
-static void wakeup_connect_hanging(struct thread *t_wakeup)
+static void wakeup_connect_hanging(struct event *t_wakeup)
{
struct daemon *dmn = THREAD_ARG(t_wakeup);
char why[100];
@@ -862,7 +862,7 @@ static int try_connect(struct daemon *dmn)
return 1;
}
-static void phase_hanging(struct thread *t_hanging)
+static void phase_hanging(struct event *t_hanging)
{
gs.t_phase_hanging = NULL;
flog_err(EC_WATCHFRR_CONNECTION,
@@ -985,7 +985,7 @@ static void try_restart(struct daemon *dmn)
run_job(&gs.restart, "restart", gs.restart_command, 0, 1);
}
-static void wakeup_unresponsive(struct thread *t_wakeup)
+static void wakeup_unresponsive(struct event *t_wakeup)
{
struct daemon *dmn = THREAD_ARG(t_wakeup);
@@ -1000,7 +1000,7 @@ static void wakeup_unresponsive(struct thread *t_wakeup)
}
}
-static void wakeup_no_answer(struct thread *t_wakeup)
+static void wakeup_no_answer(struct event *t_wakeup)
{
struct daemon *dmn = THREAD_ARG(t_wakeup);
@@ -1015,7 +1015,7 @@ static void wakeup_no_answer(struct thread *t_wakeup)
try_restart(dmn);
}
-static void wakeup_send_echo(struct thread *t_wakeup)
+static void wakeup_send_echo(struct event *t_wakeup)
{
static const char echocmd[] = "echo " PING_TOKEN;
ssize_t rc;
@@ -1118,7 +1118,7 @@ static char *translate_blanks(const char *cmd, const char *blankstr)
return res;
}
-static void startup_timeout(struct thread *t_wakeup)
+static void startup_timeout(struct event *t_wakeup)
{
daemon_send_ready(1);
}
diff --git a/zebra/dplane_fpm_nl.c b/zebra/dplane_fpm_nl.c
index 18aed7b37..697c448b8 100644
--- a/zebra/dplane_fpm_nl.c
+++ b/zebra/dplane_fpm_nl.c
@@ -83,22 +83,22 @@ struct fpm_nl_ctx {
/* data plane events. */
struct zebra_dplane_provider *prov;
struct frr_pthread *fthread;
- struct thread *t_connect;
- struct thread *t_read;
- struct thread *t_write;
- struct thread *t_event;
- struct thread *t_nhg;
- struct thread *t_dequeue;
+ struct event *t_connect;
+ struct event *t_read;
+ struct event *t_write;
+ struct event *t_event;
+ struct event *t_nhg;
+ struct event *t_dequeue;
/* zebra events. */
- struct thread *t_lspreset;
- struct thread *t_lspwalk;
- struct thread *t_nhgreset;
- struct thread *t_nhgwalk;
- struct thread *t_ribreset;
- struct thread *t_ribwalk;
- struct thread *t_rmacreset;
- struct thread *t_rmacwalk;
+ struct event *t_lspreset;
+ struct event *t_lspwalk;
+ struct event *t_nhgreset;
+ struct event *t_nhgwalk;
+ struct event *t_ribreset;
+ struct event *t_ribwalk;
+ struct event *t_rmacreset;
+ struct event *t_rmacwalk;
/* Statistic counters. */
struct {
@@ -166,16 +166,16 @@ enum fpm_nl_events {
/*
* Prototypes.
*/
-static void fpm_process_event(struct thread *t);
+static void fpm_process_event(struct event *t);
static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx);
-static void fpm_lsp_send(struct thread *t);
-static void fpm_lsp_reset(struct thread *t);
-static void fpm_nhg_send(struct thread *t);
-static void fpm_nhg_reset(struct thread *t);
-static void fpm_rib_send(struct thread *t);
-static void fpm_rib_reset(struct thread *t);
-static void fpm_rmac_send(struct thread *t);
-static void fpm_rmac_reset(struct thread *t);
+static void fpm_lsp_send(struct event *t);
+static void fpm_lsp_reset(struct event *t);
+static void fpm_nhg_send(struct event *t);
+static void fpm_nhg_reset(struct event *t);
+static void fpm_rib_send(struct event *t);
+static void fpm_rib_reset(struct event *t);
+static void fpm_rmac_send(struct event *t);
+static void fpm_rmac_reset(struct event *t);
/*
* CLI.
@@ -409,7 +409,7 @@ static struct cmd_node fpm_node = {
/*
* FPM functions.
*/
-static void fpm_connect(struct thread *t);
+static void fpm_connect(struct event *t);
static void fpm_reconnect(struct fpm_nl_ctx *fnc)
{
@@ -448,7 +448,7 @@ static void fpm_reconnect(struct fpm_nl_ctx *fnc)
&fnc->t_connect);
}
-static void fpm_read(struct thread *t)
+static void fpm_read(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
fpm_msg_hdr_t fpm;
@@ -610,7 +610,7 @@ static void fpm_read(struct thread *t)
stream_reset(fnc->ibuf);
}
-static void fpm_write(struct thread *t)
+static void fpm_write(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
socklen_t statuslen;
@@ -714,7 +714,7 @@ static void fpm_write(struct thread *t)
}
}
-static void fpm_connect(struct thread *t)
+static void fpm_connect(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
struct sockaddr_in *sin = (struct sockaddr_in *)&fnc->addr;
@@ -1020,7 +1020,7 @@ static int fpm_lsp_send_cb(struct hash_bucket *bucket, void *arg)
return HASHWALK_CONTINUE;
}
-static void fpm_lsp_send(struct thread *t)
+static void fpm_lsp_send(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
struct zebra_vrf *zvrf = vrf_info_lookup(VRF_DEFAULT);
@@ -1080,7 +1080,7 @@ static int fpm_nhg_send_cb(struct hash_bucket *bucket, void *arg)
return HASHWALK_CONTINUE;
}
-static void fpm_nhg_send(struct thread *t)
+static void fpm_nhg_send(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
struct fpm_nhg_arg fna;
@@ -1109,7 +1109,7 @@ static void fpm_nhg_send(struct thread *t)
/**
* Send all RIB installed routes to the connected data plane.
*/
-static void fpm_rib_send(struct thread *t)
+static void fpm_rib_send(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
rib_dest_t *dest;
@@ -1214,7 +1214,7 @@ static void fpm_enqueue_l3vni_table(struct hash_bucket *bucket, void *arg)
hash_iterate(zl3vni->rmac_table, fpm_enqueue_rmac_table, zl3vni);
}
-static void fpm_rmac_send(struct thread *t)
+static void fpm_rmac_send(struct event *t)
{
struct fpm_rmac_arg fra;
@@ -1240,7 +1240,7 @@ static void fpm_nhg_reset_cb(struct hash_bucket *bucket, void *arg)
UNSET_FLAG(nhe->flags, NEXTHOP_GROUP_FPM);
}
-static void fpm_nhg_reset(struct thread *t)
+static void fpm_nhg_reset(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
@@ -1260,7 +1260,7 @@ static void fpm_lsp_reset_cb(struct hash_bucket *bucket, void *arg)
UNSET_FLAG(lsp->flags, LSP_FLAG_FPM);
}
-static void fpm_lsp_reset(struct thread *t)
+static void fpm_lsp_reset(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
struct zebra_vrf *zvrf = vrf_info_lookup(VRF_DEFAULT);
@@ -1274,7 +1274,7 @@ static void fpm_lsp_reset(struct thread *t)
/**
* Resets the RIB FPM flags so we send all routes again.
*/
-static void fpm_rib_reset(struct thread *t)
+static void fpm_rib_reset(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
rib_dest_t *dest;
@@ -1315,7 +1315,7 @@ static void fpm_unset_l3vni_table(struct hash_bucket *bucket, void *arg)
hash_iterate(zl3vni->rmac_table, fpm_unset_rmac_table, zl3vni);
}
-static void fpm_rmac_reset(struct thread *t)
+static void fpm_rmac_reset(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
@@ -1326,7 +1326,7 @@ static void fpm_rmac_reset(struct thread *t)
&fnc->t_rmacwalk);
}
-static void fpm_process_queue(struct thread *t)
+static void fpm_process_queue(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
struct zebra_dplane_ctx *ctx;
@@ -1387,7 +1387,7 @@ static void fpm_process_queue(struct thread *t)
/**
* Handles external (e.g. CLI, data plane or others) events.
*/
-static void fpm_process_event(struct thread *t)
+static void fpm_process_event(struct event *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
enum fpm_nl_events event = THREAD_VAL(t);
diff --git a/zebra/interface.c b/zebra/interface.c
index 1ba5e972f..fdc538bf0 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -51,7 +51,7 @@ DEFINE_MTYPE(ZEBRA, ZIF_DESC, "Intf desc");
static void if_down_del_nbr_connected(struct interface *ifp);
-static void if_zebra_speed_update(struct thread *thread)
+static void if_zebra_speed_update(struct event *thread)
{
struct interface *ifp = THREAD_ARG(thread);
struct zebra_if *zif = ifp->info;
diff --git a/zebra/interface.h b/zebra/interface.h
index c8ae906c9..4c6ebaa11 100644
--- a/zebra/interface.h
+++ b/zebra/interface.h
@@ -199,7 +199,7 @@ struct zebra_if {
struct interface *link;
uint8_t speed_update_count;
- struct thread *speed_update;
+ struct event *speed_update;
/*
* Does this interface have a v6 to v4 ll neighbor entry
diff --git a/zebra/irdp.h b/zebra/irdp.h
index 9b97bb93f..433073499 100644
--- a/zebra/irdp.h
+++ b/zebra/irdp.h
@@ -114,7 +114,7 @@ struct irdp_interface {
#define IF_SHUTDOWN (1<<6)
struct interface *ifp;
- struct thread *t_advertise;
+ struct event *t_advertise;
unsigned long irdp_sent;
uint16_t Lifetime;
@@ -129,10 +129,10 @@ struct Adv {
extern void irdp_if_init(void);
extern int irdp_sock_init(void);
extern int irdp_config_write(struct vty *, struct interface *);
-extern void irdp_send_thread(struct thread *t_advert);
+extern void irdp_send_thread(struct event *t_advert);
extern void irdp_advert_off(struct interface *ifp);
extern void process_solicit(struct interface *ifp);
-extern void irdp_read_raw(struct thread *r);
+extern void irdp_read_raw(struct event *r);
extern void send_packet(struct interface *ifp, struct stream *s, uint32_t dst,
struct prefix *p, uint32_t ttl);
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index 894097020..4d9aad5ce 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -56,7 +56,7 @@
extern struct zebra_privs_t zserv_privs;
-struct thread *t_irdp_raw;
+struct event *t_irdp_raw;
/* Timer interval of irdp. */
int irdp_timer_interval = IRDP_DEFAULT_INTERVAL;
@@ -190,7 +190,7 @@ static void irdp_advertisement(struct interface *ifp, struct prefix *p)
stream_free(s);
}
-void irdp_send_thread(struct thread *t_advert)
+void irdp_send_thread(struct event *t_advert)
{
uint32_t timer, tmp;
struct interface *ifp = THREAD_ARG(t_advert);
diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c
index 7903f14e1..aee59a78f 100644
--- a/zebra/irdp_packet.c
+++ b/zebra/irdp_packet.c
@@ -52,7 +52,7 @@
int irdp_sock = -1;
-extern struct thread *t_irdp_raw;
+extern struct event *t_irdp_raw;
static void parse_irdp_packet(char *p, int len, struct interface *ifp)
{
@@ -209,7 +209,7 @@ static int irdp_recvmsg(int sock, uint8_t *buf, int size, int *ifindex)
return ret;
}
-void irdp_read_raw(struct thread *r)
+void irdp_read_raw(struct event *r)
{
struct interface *ifp;
struct zebra_if *zi;
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index fdf4b850d..a779533e3 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -482,7 +482,7 @@ static int dplane_netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
return 0;
}
-static void kernel_read(struct thread *thread)
+static void kernel_read(struct event *thread)
{
struct zebra_ns *zns = (struct zebra_ns *)THREAD_ARG(thread);
struct zebra_dplane_info dp_info;
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 04f484cd9..8f00297b6 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -1281,7 +1281,7 @@ static void rtmsg_debug(struct rt_msghdr *rtm)
#endif /* RTAX_MAX */
/* Kernel routing table and interface updates via routing socket. */
-static void kernel_read(struct thread *thread)
+static void kernel_read(struct event *thread)
{
int sock;
int nbytes;
diff --git a/zebra/main.c b/zebra/main.c
index 49b928d09..25480f41d 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -203,7 +203,7 @@ static void sigint(void)
* Final shutdown step for the zebra main thread. This is run after all
* async update processing has completed.
*/
-void zebra_finalize(struct thread *dummy)
+void zebra_finalize(struct event *dummy)
{
zlog_info("Zebra final shutdown");
diff --git a/zebra/rib.h b/zebra/rib.h
index 70968d390..0e897881e 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -402,7 +402,7 @@ extern struct route_entry *rib_lookup_ipv4(struct prefix_ipv4 *p,
extern void rib_update(enum rib_update_event event);
extern void rib_update_table(struct route_table *table,
enum rib_update_event event, int rtype);
-extern void rib_sweep_route(struct thread *t);
+extern void rib_sweep_route(struct event *t);
extern void rib_sweep_table(struct route_table *table);
extern void rib_close_table(struct route_table *table);
extern void rib_init(void);
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 7f9a8ed00..c1c4e1f2a 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -475,7 +475,7 @@ no_more_opts:
zif->ra_sent++;
}
-static void rtadv_timer(struct thread *thread)
+static void rtadv_timer(struct event *thread)
{
struct zebra_vrf *zvrf = THREAD_ARG(thread);
struct vrf *vrf;
@@ -817,7 +817,7 @@ static void rtadv_process_packet(uint8_t *buf, unsigned int len,
return;
}
-static void rtadv_read(struct thread *thread)
+static void rtadv_read(struct event *thread)
{
int sock;
int len;
diff --git a/zebra/rtadv.h b/zebra/rtadv.h
index 2338efe0b..1ec376a10 100644
--- a/zebra/rtadv.h
+++ b/zebra/rtadv.h
@@ -30,8 +30,8 @@ struct rtadv {
struct adv_if_list_head adv_if;
struct adv_if_list_head adv_msec_if;
- struct thread *ra_read;
- struct thread *ra_timer;
+ struct event *ra_read;
+ struct event *ra_timer;
};
PREDECL_RBTREE_UNIQ(rtadv_prefixes);
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index af1dd6b5f..4b38a4b85 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -476,10 +476,10 @@ struct dplane_zns_info {
struct zebra_dplane_info info;
/* Request data from the OS */
- struct thread *t_request;
+ struct event *t_request;
/* Read event */
- struct thread *t_read;
+ struct event *t_read;
/* List linkage */
struct zns_info_list_item link;
@@ -585,10 +585,10 @@ static struct zebra_dplane_globals {
struct thread_master *dg_master;
/* Event/'thread' pointer for queued updates */
- struct thread *dg_t_update;
+ struct event *dg_t_update;
/* Event pointer for pending shutdown check loop */
- struct thread *dg_t_shutdown_check;
+ struct event *dg_t_shutdown_check;
} zdplane_info;
@@ -609,7 +609,7 @@ DECLARE_DLIST(zns_info_list, struct dplane_zns_info, link);
#define DPLANE_PROV_UNLOCK(p) pthread_mutex_unlock(&((p)->dp_mutex))
/* Prototypes */
-static void dplane_thread_loop(struct thread *event);
+static void dplane_thread_loop(struct event *event);
static enum zebra_dplane_result lsp_update_internal(struct zebra_lsp *lsp,
enum dplane_op_e op);
static enum zebra_dplane_result pw_update_internal(struct zebra_pw *pw,
@@ -5773,7 +5773,7 @@ bool dplane_provider_is_threaded(const struct zebra_dplane_provider *prov)
* Callback when an OS (netlink) incoming event read is ready. This runs
* in the dplane pthread.
*/
-static void dplane_incoming_read(struct thread *event)
+static void dplane_incoming_read(struct event *event)
{
struct dplane_zns_info *zi = THREAD_ARG(event);
@@ -5788,7 +5788,7 @@ static void dplane_incoming_read(struct thread *event)
* Callback in the dataplane pthread that requests info from the OS and
* initiates netlink reads.
*/
-static void dplane_incoming_request(struct thread *event)
+static void dplane_incoming_request(struct event *event)
{
struct dplane_zns_info *zi = THREAD_ARG(event);
@@ -6597,7 +6597,7 @@ static bool dplane_work_pending(void)
* final zebra shutdown.
* This runs in the dplane pthread context.
*/
-static void dplane_check_shutdown_status(struct thread *event)
+static void dplane_check_shutdown_status(struct event *event)
{
struct dplane_zns_info *zi;
@@ -6664,7 +6664,7 @@ void zebra_dplane_finish(void)
* pthread can look for other pending work - such as i/o work on behalf of
* providers.
*/
-static void dplane_thread_loop(struct thread *event)
+static void dplane_thread_loop(struct event *event)
{
struct dplane_ctx_list_head work_list;
struct dplane_ctx_list_head error_list;
diff --git a/zebra/zebra_evpn_mac.c b/zebra/zebra_evpn_mac.c
index a2d310a10..2c55a54c7 100644
--- a/zebra/zebra_evpn_mac.c
+++ b/zebra/zebra_evpn_mac.c
@@ -378,7 +378,7 @@ static char *zebra_evpn_zebra_mac_flag_dump(struct zebra_mac *mac, char *buf,
return buf;
}
-static void zebra_evpn_dad_mac_auto_recovery_exp(struct thread *t)
+static void zebra_evpn_dad_mac_auto_recovery_exp(struct event *t)
{
struct zebra_vrf *zvrf = NULL;
struct zebra_mac *mac = NULL;
@@ -1500,7 +1500,7 @@ void zebra_evpn_mac_send_add_del_to_client(struct zebra_mac *mac,
* external neighmgr daemon to probe existing hosts to independently
* establish their presence on the ES.
*/
-static void zebra_evpn_mac_hold_exp_cb(struct thread *t)
+static void zebra_evpn_mac_hold_exp_cb(struct event *t)
{
struct zebra_mac *mac;
bool old_bgp_ready;
diff --git a/zebra/zebra_evpn_mac.h b/zebra/zebra_evpn_mac.h
index befb1c398..ba612f769 100644
--- a/zebra/zebra_evpn_mac.h
+++ b/zebra/zebra_evpn_mac.h
@@ -114,14 +114,14 @@ struct zebra_mac {
/* Duplicate mac detection */
uint32_t dad_count;
- struct thread *dad_mac_auto_recovery_timer;
+ struct event *dad_mac_auto_recovery_timer;
struct timeval detect_start_time;
time_t dad_dup_detect_time;
/* used for ageing out the PEER_ACTIVE flag */
- struct thread *hold_timer;
+ struct event *hold_timer;
/* number of neigh entries (using this mac) that have
* ZEBRA_MAC_ES_PEER_ACTIVE or ZEBRA_NEIGH_ES_PEER_PROXY
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c
index 334dde3b1..85a96fe4f 100644
--- a/zebra/zebra_evpn_mh.c
+++ b/zebra/zebra_evpn_mh.c
@@ -2201,7 +2201,7 @@ static void zebra_evpn_mh_advertise_svi_mac(void)
zebra_evpn_acc_vl_adv_svi_mac_all();
}
-static void zebra_evpn_es_df_delay_exp_cb(struct thread *t)
+static void zebra_evpn_es_df_delay_exp_cb(struct event *t)
{
struct zebra_evpn_es *es;
@@ -3917,7 +3917,7 @@ void zebra_evpn_mh_uplink_oper_update(struct zebra_if *zif)
new_protodown);
}
-static void zebra_evpn_mh_startup_delay_exp_cb(struct thread *t)
+static void zebra_evpn_mh_startup_delay_exp_cb(struct event *t)
{
if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
zlog_debug("startup-delay expired");
diff --git a/zebra/zebra_evpn_mh.h b/zebra/zebra_evpn_mh.h
index 89a917628..6dda30a57 100644
--- a/zebra/zebra_evpn_mh.h
+++ b/zebra/zebra_evpn_mh.h
@@ -87,7 +87,7 @@ struct zebra_evpn_es {
* imported before running the DF election.
*/
#define ZEBRA_EVPN_MH_DF_DELAY_TIME 3 /* seconds */
- struct thread *df_delay_timer;
+ struct event *df_delay_timer;
};
RB_HEAD(zebra_es_rb_head, zebra_evpn_es);
RB_PROTOTYPE(zebra_es_rb_head, zebra_evpn_es, rb_node, zebra_es_rb_cmp);
@@ -248,7 +248,7 @@ struct zebra_evpn_mh_info {
*/
int startup_delay_time; /* seconds */
#define ZEBRA_EVPN_MH_STARTUP_DELAY_DEF (3 * 60)
- struct thread *startup_delay_timer;
+ struct event *startup_delay_timer;
/* Number of configured uplinks */
uint32_t uplink_cfg_cnt;
diff --git a/zebra/zebra_evpn_neigh.c b/zebra/zebra_evpn_neigh.c
index acd60aa08..b27ddb5e6 100644
--- a/zebra/zebra_evpn_neigh.c
+++ b/zebra/zebra_evpn_neigh.c
@@ -397,7 +397,7 @@ void zebra_evpn_sync_neigh_static_chg(struct zebra_neigh *n, bool old_n_static,
* external neighmgr daemon to probe existing hosts to independently
* establish their presence on the ES.
*/
-static void zebra_evpn_neigh_hold_exp_cb(struct thread *t)
+static void zebra_evpn_neigh_hold_exp_cb(struct event *t)
{
struct zebra_neigh *n;
bool old_bgp_ready;
@@ -1080,7 +1080,7 @@ static int zebra_evpn_ip_inherit_dad_from_mac(struct zebra_vrf *zvrf,
return 0;
}
-static void zebra_evpn_dad_ip_auto_recovery_exp(struct thread *t)
+static void zebra_evpn_dad_ip_auto_recovery_exp(struct event *t)
{
struct zebra_vrf *zvrf = NULL;
struct zebra_neigh *nbr = NULL;
diff --git a/zebra/zebra_evpn_neigh.h b/zebra/zebra_evpn_neigh.h
index 18ef8546d..67fef799c 100644
--- a/zebra/zebra_evpn_neigh.h
+++ b/zebra/zebra_evpn_neigh.h
@@ -92,7 +92,7 @@ struct zebra_neigh {
/* Duplicate ip detection */
uint32_t dad_count;
- struct thread *dad_ip_auto_recovery_timer;
+ struct event *dad_ip_auto_recovery_timer;
struct timeval detect_start_time;
@@ -101,7 +101,7 @@ struct zebra_neigh {
time_t uptime;
/* used for ageing out the PEER_ACTIVE flag */
- struct thread *hold_timer;
+ struct event *hold_timer;
};
/*
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index f7de5eb0c..0795d1226 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -204,15 +204,15 @@ struct zfpm_glob {
/*
* Threads for I/O.
*/
- struct thread *t_connect;
- struct thread *t_write;
- struct thread *t_read;
+ struct event *t_connect;
+ struct event *t_write;
+ struct event *t_read;
/*
* Thread to clean up after the TCP connection to the FPM goes down
* and the state that belongs to it.
*/
- struct thread *t_conn_down;
+ struct event *t_conn_down;
struct {
struct zfpm_rnodes_iter iter;
@@ -222,7 +222,7 @@ struct zfpm_glob {
* Thread to take actions once the TCP conn to the FPM comes up, and
* the state that belongs to it.
*/
- struct thread *t_conn_up;
+ struct event *t_conn_up;
struct {
struct zfpm_rnodes_iter iter;
@@ -251,7 +251,7 @@ struct zfpm_glob {
/*
* Stats interval timer.
*/
- struct thread *t_stats;
+ struct event *t_stats;
/*
* If non-zero, the last time when statistics were cleared.
@@ -269,8 +269,8 @@ static struct zfpm_glob *zfpm_g = &zfpm_glob_space;
static int zfpm_trigger_update(struct route_node *rn, const char *reason);
-static void zfpm_read_cb(struct thread *thread);
-static void zfpm_write_cb(struct thread *thread);
+static void zfpm_read_cb(struct event *thread);
+static void zfpm_write_cb(struct event *thread);
static void zfpm_set_state(enum zfpm_state state, const char *reason);
static void zfpm_start_connect_timer(const char *reason);
@@ -283,7 +283,7 @@ union g_addr ipv4ll_gateway;
/*
* zfpm_thread_should_yield
*/
-static inline int zfpm_thread_should_yield(struct thread *t)
+static inline int zfpm_thread_should_yield(struct event *t)
{
return thread_should_yield(t);
}
@@ -503,7 +503,7 @@ static inline void zfpm_connect_off(void)
* Callback for actions to be taken when the connection to the FPM
* comes up.
*/
-static void zfpm_conn_up_thread_cb(struct thread *thread)
+static void zfpm_conn_up_thread_cb(struct event *thread)
{
struct route_node *rnode;
struct zfpm_rnodes_iter *iter;
@@ -619,7 +619,7 @@ static void zfpm_connect_check(void)
* Callback that is invoked to clean up state after the TCP connection
* to the FPM goes down.
*/
-static void zfpm_conn_down_thread_cb(struct thread *thread)
+static void zfpm_conn_down_thread_cb(struct event *thread)
{
struct route_node *rnode;
struct zfpm_rnodes_iter *iter;
@@ -723,7 +723,7 @@ static void zfpm_connection_down(const char *detail)
/*
* zfpm_read_cb
*/
-static void zfpm_read_cb(struct thread *thread)
+static void zfpm_read_cb(struct event *thread)
{
size_t already;
struct stream *ibuf;
@@ -1152,7 +1152,7 @@ static void zfpm_build_updates(void)
/*
* zfpm_write_cb
*/
-static void zfpm_write_cb(struct thread *thread)
+static void zfpm_write_cb(struct event *thread)
{
struct stream *s;
int num_writes;
@@ -1234,7 +1234,7 @@ static void zfpm_write_cb(struct thread *thread)
/*
* zfpm_connect_cb
*/
-static void zfpm_connect_cb(struct thread *t)
+static void zfpm_connect_cb(struct event *t)
{
int sock, ret;
struct sockaddr_in serv;
@@ -1664,7 +1664,7 @@ static void zfpm_iterate_rmac_table(struct hash_bucket *bucket, void *args)
/*
* struct zfpm_statsimer_cb
*/
-static void zfpm_stats_timer_cb(struct thread *t)
+static void zfpm_stats_timer_cb(struct event *t)
{
zfpm_g->t_stats = NULL;
diff --git a/zebra/zebra_gr.c b/zebra/zebra_gr.c
index c9881e51d..8aee7f0d7 100644
--- a/zebra/zebra_gr.c
+++ b/zebra/zebra_gr.c
@@ -39,7 +39,7 @@ DEFINE_MTYPE_STATIC(ZEBRA, ZEBRA_GR, "GR");
* Forward declaration.
*/
static struct zserv *zebra_gr_find_stale_client(struct zserv *client);
-static void zebra_gr_route_stale_delete_timer_expiry(struct thread *thread);
+static void zebra_gr_route_stale_delete_timer_expiry(struct event *thread);
static int32_t zebra_gr_delete_stale_routes(struct client_gr_info *info);
static void zebra_gr_process_client_stale_routes(struct zserv *client,
vrf_id_t vrf_id);
@@ -461,7 +461,7 @@ void zread_client_capabilities(ZAPI_HANDLER_ARGS)
* Delete all the stale routes that have not been refreshed
* post restart.
*/
-static void zebra_gr_route_stale_delete_timer_expiry(struct thread *thread)
+static void zebra_gr_route_stale_delete_timer_expiry(struct event *thread)
{
struct client_gr_info *info = THREAD_ARG(thread);
int32_t cnt = 0;
diff --git a/zebra/zebra_mlag.c b/zebra/zebra_mlag.c
index b4a0c575a..ad128f8af 100644
--- a/zebra/zebra_mlag.c
+++ b/zebra/zebra_mlag.c
@@ -36,8 +36,8 @@ uint8_t mlag_rd_buffer[ZEBRA_MLAG_BUF_LIMIT];
static bool test_mlag_in_progress;
static int zebra_mlag_signal_write_thread(void);
-static void zebra_mlag_terminate_pthread(struct thread *event);
-static void zebra_mlag_post_data_from_main_thread(struct thread *thread);
+static void zebra_mlag_terminate_pthread(struct event *event);
+static void zebra_mlag_post_data_from_main_thread(struct event *thread);
static void zebra_mlag_publish_process_state(struct zserv *client,
zebra_message_types_t msg_type);
@@ -132,7 +132,7 @@ void zebra_mlag_process_mlag_data(uint8_t *data, uint32_t len)
* This thread reads the clients data from the Global queue and encodes with
* protobuf and pass on to the MLAG socket.
*/
-static void zebra_mlag_client_msg_handler(struct thread *event)
+static void zebra_mlag_client_msg_handler(struct event *event)
{
struct stream *s;
uint32_t wr_count = 0;
@@ -292,7 +292,7 @@ static void zebra_mlag_publish_process_state(struct zserv *client,
* main thread, because for that access was needed for clients list.
* so instead of forcing the locks, messages will be posted from main thread.
*/
-static void zebra_mlag_post_data_from_main_thread(struct thread *thread)
+static void zebra_mlag_post_data_from_main_thread(struct event *thread)
{
struct stream *s = THREAD_ARG(thread);
struct stream *zebra_s = NULL;
@@ -376,7 +376,7 @@ static void zebra_mlag_spawn_pthread(void)
* all clients are un-registered for MLAG Updates, terminate the
* MLAG write thread
*/
-static void zebra_mlag_terminate_pthread(struct thread *event)
+static void zebra_mlag_terminate_pthread(struct event *event)
{
if (IS_ZEBRA_DEBUG_MLAG)
zlog_debug("Zebra MLAG write thread terminate called");
diff --git a/zebra/zebra_mlag_private.c b/zebra/zebra_mlag_private.c
index d9189206f..ba66dc464 100644
--- a/zebra/zebra_mlag_private.c
+++ b/zebra/zebra_mlag_private.c
@@ -35,8 +35,8 @@
static struct thread_master *zmlag_master;
static int mlag_socket;
-static void zebra_mlag_connect(struct thread *thread);
-static void zebra_mlag_read(struct thread *thread);
+static void zebra_mlag_connect(struct event *thread);
+static void zebra_mlag_read(struct event *thread);
/*
* Write the data to MLAGD
@@ -59,7 +59,7 @@ static void zebra_mlag_sched_read(void)
&zrouter.mlag_info.t_read);
}
-static void zebra_mlag_read(struct thread *thread)
+static void zebra_mlag_read(struct event *thread)
{
static uint32_t mlag_rd_buf_offset;
uint32_t *msglen;
@@ -151,7 +151,7 @@ static void zebra_mlag_read(struct thread *thread)
zebra_mlag_sched_read();
}
-static void zebra_mlag_connect(struct thread *thread)
+static void zebra_mlag_connect(struct event *thread)
{
struct sockaddr_un svr = {0};
diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c
index 468acbdfe..205c10ce2 100644
--- a/zebra/zebra_netns_notify.c
+++ b/zebra/zebra_netns_notify.c
@@ -41,18 +41,18 @@
#define ZEBRA_NS_POLLING_MAX_RETRIES 200
DEFINE_MTYPE_STATIC(ZEBRA, NETNS_MISC, "ZebraNetNSInfo");
-static struct thread *zebra_netns_notify_current;
+static struct event *zebra_netns_notify_current;
struct zebra_netns_info {
const char *netnspath;
unsigned int retries;
};
-static void zebra_ns_ready_read(struct thread *t);
+static void zebra_ns_ready_read(struct event *t);
static void zebra_ns_notify_create_context_from_entry_name(const char *name);
static int zebra_ns_continue_read(struct zebra_netns_info *zns_info,
int stop_retry);
-static void zebra_ns_notify_read(struct thread *t);
+static void zebra_ns_notify_read(struct event *t);
static struct vrf *vrf_handler_create(struct vty *vty, const char *vrfname)
{
@@ -229,7 +229,7 @@ static bool zebra_ns_notify_is_default_netns(const char *name)
return false;
}
-static void zebra_ns_ready_read(struct thread *t)
+static void zebra_ns_ready_read(struct event *t)
{
struct zebra_netns_info *zns_info = THREAD_ARG(t);
const char *netnspath;
@@ -280,7 +280,7 @@ static void zebra_ns_ready_read(struct thread *t)
zebra_ns_continue_read(zns_info, 1);
}
-static void zebra_ns_notify_read(struct thread *t)
+static void zebra_ns_notify_read(struct event *t)
{
int fd_monitor = THREAD_FD(t);
struct inotify_event *event;
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c
index 654cf50d4..f42c7a42d 100644
--- a/zebra/zebra_nhg.c
+++ b/zebra/zebra_nhg.c
@@ -1683,7 +1683,7 @@ void zebra_nhg_hash_free_zero_id(struct hash_bucket *b, void *arg)
}
}
-static void zebra_nhg_timer(struct thread *thread)
+static void zebra_nhg_timer(struct event *thread)
{
struct nhg_hash_entry *nhe = THREAD_ARG(thread);
diff --git a/zebra/zebra_nhg.h b/zebra/zebra_nhg.h
index 5830952d5..b178007b4 100644
--- a/zebra/zebra_nhg.h
+++ b/zebra/zebra_nhg.h
@@ -89,7 +89,7 @@ struct nhg_hash_entry {
*/
struct nhg_connected_tree_head nhg_depends, nhg_dependents;
- struct thread *timer;
+ struct event *timer;
/*
* Is this nexthop group valid, ie all nexthops are fully resolved.
diff --git a/zebra/zebra_ns.h b/zebra/zebra_ns.h
index 5e8764854..e759d522f 100644
--- a/zebra/zebra_ns.h
+++ b/zebra/zebra_ns.h
@@ -46,7 +46,7 @@ struct zebra_ns {
*/
struct nlsock netlink_dplane_out;
struct nlsock netlink_dplane_in;
- struct thread *t_netlink;
+ struct event *t_netlink;
#endif
struct route_table *if_table;
diff --git a/zebra/zebra_opaque.c b/zebra/zebra_opaque.c
index 7cfb3294e..491ea45d9 100644
--- a/zebra/zebra_opaque.c
+++ b/zebra/zebra_opaque.c
@@ -80,7 +80,7 @@ static struct zebra_opaque_globals {
struct thread_master *master;
/* Event/'thread' pointer for queued zapi messages */
- struct thread *t_msgs;
+ struct event *t_msgs;
/* Input fifo queue to the module, and lock to protect it. */
pthread_mutex_t mutex;
@@ -94,7 +94,7 @@ static const char LOG_NAME[] = "Zebra Opaque";
/* Prototypes */
/* Main event loop, processing incoming message queue */
-static void process_messages(struct thread *event);
+static void process_messages(struct event *event);
static int handle_opq_registration(const struct zmsghdr *hdr,
struct stream *msg);
static int handle_opq_unregistration(const struct zmsghdr *hdr,
@@ -258,7 +258,7 @@ uint32_t zebra_opaque_enqueue_batch(struct stream_fifo *batch)
/*
* Pthread event loop, process the incoming message queue.
*/
-static void process_messages(struct thread *event)
+static void process_messages(struct event *event)
{
struct stream_fifo fifo;
struct stream *msg;
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c
index a8f4953d5..301f1c3f7 100644
--- a/zebra/zebra_ptm.c
+++ b/zebra/zebra_ptm.c
@@ -84,7 +84,7 @@ static ptm_lib_handle_t *ptm_hdl;
struct zebra_ptm_cb ptm_cb;
static int zebra_ptm_socket_init(void);
-void zebra_ptm_sock_read(struct thread *thread);
+void zebra_ptm_sock_read(struct event *thread);
static void zebra_ptm_install_commands(void);
static int zebra_ptm_handle_msg_cb(void *arg, void *in_ctxt);
void zebra_bfd_peer_replay_req(void);
@@ -152,7 +152,7 @@ void zebra_ptm_finish(void)
close(ptm_cb.ptm_sock);
}
-static void zebra_ptm_flush_messages(struct thread *thread)
+static void zebra_ptm_flush_messages(struct event *thread)
{
ptm_cb.t_write = NULL;
@@ -208,7 +208,7 @@ static int zebra_ptm_send_message(char *data, int size)
return 0;
}
-void zebra_ptm_connect(struct thread *t)
+void zebra_ptm_connect(struct event *t)
{
int init = 0;
@@ -629,7 +629,7 @@ static int zebra_ptm_handle_msg_cb(void *arg, void *in_ctxt)
}
}
-void zebra_ptm_sock_read(struct thread *thread)
+void zebra_ptm_sock_read(struct event *thread)
{
int sock;
int rc;
diff --git a/zebra/zebra_ptm.h b/zebra/zebra_ptm.h
index 9cea96555..1b2f7a02d 100644
--- a/zebra/zebra_ptm.h
+++ b/zebra/zebra_ptm.h
@@ -26,9 +26,9 @@ struct zebra_ptm_cb {
struct buffer *wb; /* Buffer of data waiting to be written to ptm. */
- struct thread *t_read; /* Thread for read */
- struct thread *t_write; /* Thread for write */
- struct thread *t_timer; /* Thread for timer */
+ struct event *t_read; /* Thread for read */
+ struct event *t_write; /* Thread for write */
+ struct event *t_timer; /* Thread for timer */
char *out_data;
char *in_data;
@@ -57,7 +57,7 @@ struct zebra_ptm_cb {
void zebra_ptm_init(void);
void zebra_ptm_finish(void);
-void zebra_ptm_connect(struct thread *t);
+void zebra_ptm_connect(struct event *t);
void zebra_ptm_write(struct vty *vty);
int zebra_ptm_get_enable_state(void);
diff --git a/zebra/zebra_pw.c b/zebra/zebra_pw.c
index a3f7ba628..243ce3095 100644
--- a/zebra/zebra_pw.c
+++ b/zebra/zebra_pw.c
@@ -33,7 +33,7 @@ DEFINE_HOOK(pw_uninstall, (struct zebra_pw * pw), (pw));
static int zebra_pw_enabled(struct zebra_pw *);
static void zebra_pw_install(struct zebra_pw *);
static void zebra_pw_uninstall(struct zebra_pw *);
-static void zebra_pw_install_retry(struct thread *thread);
+static void zebra_pw_install_retry(struct event *thread);
static int zebra_pw_check_reachability(const struct zebra_pw *);
static void zebra_pw_update_status(struct zebra_pw *, int);
@@ -214,7 +214,7 @@ void zebra_pw_install_failure(struct zebra_pw *pw, int pwstatus)
zebra_pw_update_status(pw, pwstatus);
}
-static void zebra_pw_install_retry(struct thread *thread)
+static void zebra_pw_install_retry(struct event *thread)
{
struct zebra_pw *pw = THREAD_ARG(thread);
diff --git a/zebra/zebra_pw.h b/zebra/zebra_pw.h
index d939cc07e..fd94d5e5e 100644
--- a/zebra/zebra_pw.h
+++ b/zebra/zebra_pw.h
@@ -38,7 +38,7 @@ struct zebra_pw {
uint8_t protocol;
struct zserv *client;
struct rnh *rnh;
- struct thread *install_retry_timer;
+ struct event *install_retry_timer;
QOBJ_FIELDS;
};
DECLARE_QOBJ_TYPE(zebra_pw);
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 5e9eda168..082afbe0f 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -56,7 +56,7 @@ DEFINE_MTYPE_STATIC(ZEBRA, WQ_WRAPPER, "WQ wrapper");
* Event, list, and mutex for delivery of dataplane results
*/
static pthread_mutex_t dplane_mutex;
-static struct thread *t_dplane;
+static struct event *t_dplane;
static struct dplane_ctx_list_head rib_dplane_q;
DEFINE_HOOK(rib_update, (struct route_node * rn, const char *reason),
@@ -4393,7 +4393,7 @@ static void rib_update_ctx_fini(struct rib_update_ctx **ctx)
XFREE(MTYPE_RIB_UPDATE_CTX, *ctx);
}
-static void rib_update_handler(struct thread *thread)
+static void rib_update_handler(struct event *thread)
{
struct rib_update_ctx *ctx;
@@ -4408,7 +4408,7 @@ static void rib_update_handler(struct thread *thread)
* Thread list to ensure we don't schedule a ton of events
* if interfaces are flapping for instance.
*/
-static struct thread *t_rib_update_threads[RIB_UPDATE_MAX];
+static struct event *t_rib_update_threads[RIB_UPDATE_MAX];
/* Schedule a RIB update event for all vrfs */
void rib_update(enum rib_update_event event)
@@ -4494,7 +4494,7 @@ void rib_sweep_table(struct route_table *table)
}
/* Sweep all RIB tables. */
-void rib_sweep_route(struct thread *t)
+void rib_sweep_route(struct event *t)
{
struct vrf *vrf;
struct zebra_vrf *zvrf;
@@ -4606,7 +4606,7 @@ static void handle_pw_result(struct zebra_dplane_ctx *ctx)
* Handle results from the dataplane system. Dequeue update context
* structs, dispatch to appropriate internal handlers.
*/
-static void rib_process_dplane_results(struct thread *thread)
+static void rib_process_dplane_results(struct event *thread)
{
struct zebra_dplane_ctx *ctx;
struct dplane_ctx_list_head ctxlist;
diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c
index c5bccd05a..8558d0f96 100644
--- a/zebra/zebra_routemap.c
+++ b/zebra/zebra_routemap.c
@@ -28,7 +28,7 @@
#include "zebra/zebra_routemap_clippy.c"
static uint32_t zebra_rmap_update_timer = ZEBRA_RMAP_DEFAULT_UPDATE_TIMER;
-static struct thread *zebra_t_rmap_update = NULL;
+static struct event *zebra_t_rmap_update = NULL;
char *zebra_import_table_routemap[AFI_MAX][ZEBRA_KERNEL_TABLE_MAX];
struct nh_rmap_obj {
@@ -1722,7 +1722,7 @@ static void zebra_route_map_process_update_cb(char *rmap_name)
zebra_nht_rm_update(rmap_name);
}
-static void zebra_route_map_update_timer(struct thread *thread)
+static void zebra_route_map_update_timer(struct event *thread)
{
if (IS_ZEBRA_DEBUG_EVENT)
zlog_debug("Event driven route-map update triggered");
diff --git a/zebra/zebra_router.h b/zebra/zebra_router.h
index 3112fcab4..028a41c31 100644
--- a/zebra/zebra_router.h
+++ b/zebra/zebra_router.h
@@ -118,9 +118,9 @@ struct zebra_mlag_info {
* so no issues.
*
*/
- struct thread *t_read;
+ struct event *t_read;
/* Event for MLAG write */
- struct thread *t_write;
+ struct event *t_write;
};
struct zebra_router {
@@ -194,7 +194,7 @@ struct zebra_router {
* Time for when we sweep the rib from old routes
*/
time_t startup_time;
- struct thread *sweeper;
+ struct event *sweeper;
/*
* The hash of nexthop groups associated with this router
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 3563068a6..ba05e860a 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -213,7 +213,7 @@ static void zserv_client_fail(struct zserv *client)
* allows us to expose information about input and output queues to the user in
* terms of number of packets rather than size of data.
*/
-static void zserv_write(struct thread *thread)
+static void zserv_write(struct event *thread)
{
struct zserv *client = THREAD_ARG(thread);
struct stream *msg;
@@ -306,7 +306,7 @@ zwrite_fail:
*
* Any failure in any of these actions is handled by terminating the client.
*/
-static void zserv_read(struct thread *thread)
+static void zserv_read(struct event *thread)
{
struct zserv *client = THREAD_ARG(thread);
int sock;
@@ -491,7 +491,7 @@ static void zserv_client_event(struct zserv *client,
* rely on the read thread to handle queuing this task enough times to process
* everything on the input queue.
*/
-static void zserv_process_messages(struct thread *thread)
+static void zserv_process_messages(struct event *thread)
{
struct zserv *client = THREAD_ARG(thread);
struct stream *msg;
@@ -570,7 +570,7 @@ DEFINE_KOOH(zserv_client_close, (struct zserv *client), (client));
* - Free associated resources
* - Free client structure
*
- * This does *not* take any action on the struct thread * fields. These are
+ * This does *not* take any action on the struct event * fields. These are
* managed by the owning pthread and any tasks associated with them must have
* been stopped prior to invoking this function.
*/
@@ -709,7 +709,7 @@ void zserv_close_client(struct zserv *client)
* already have been closed and the thread will most likely have died, but its
* resources still need to be cleaned up.
*/
-static void zserv_handle_client_fail(struct thread *thread)
+static void zserv_handle_client_fail(struct event *thread)
{
struct zserv *client = THREAD_ARG(thread);
@@ -846,7 +846,7 @@ void zserv_release_client(struct zserv *client)
/*
* Accept socket connection.
*/
-static void zserv_accept(struct thread *thread)
+static void zserv_accept(struct event *thread)
{
int accept_sock;
int client_sock;
diff --git a/zebra/zserv.h b/zebra/zserv.h
index 0faea9dd7..fc1fd0ec9 100644
--- a/zebra/zserv.h
+++ b/zebra/zserv.h
@@ -70,7 +70,7 @@ struct client_gr_info {
/* Book keeping */
struct prefix *current_prefix;
void *stale_client_ptr;
- struct thread *t_stale_removal;
+ struct event *t_stale_removal;
TAILQ_ENTRY(client_gr_info) gr_info;
};
@@ -105,14 +105,14 @@ struct zserv {
struct buffer *wb;
/* Threads for read/write. */
- struct thread *t_read;
- struct thread *t_write;
+ struct event *t_read;
+ struct event *t_write;
/* Event for message processing, for the main pthread */
- struct thread *t_process;
+ struct event *t_process;
/* Event for the main pthread */
- struct thread *t_cleanup;
+ struct event *t_cleanup;
/* This client's redistribute flag. */
struct redist_proto mi_redist[AFI_MAX][ZEBRA_ROUTE_MAX];
@@ -378,7 +378,7 @@ void zserv_log_message(const char *errmsg, struct stream *msg,
struct zmsghdr *hdr);
/* TODO */
-__attribute__((__noreturn__)) void zebra_finalize(struct thread *event);
+__attribute__((__noreturn__)) void zebra_finalize(struct event *event);
/*
* Graceful restart functions.