]> git.proxmox.com Git - mirror_frr.git/commitdiff
*: Rename `struct thread` to `struct event`
authorDonald Sharp <sharpd@nvidia.com>
Tue, 1 Mar 2022 21:18:12 +0000 (16:18 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 24 Mar 2023 12:32:17 +0000 (08:32 -0400)
Effectively a massive search and replace of
`struct thread` to `struct event`.  Using the
term `thread` gives people the thought that
this event system is a pthread when it is not

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
299 files changed:
babeld/babeld.c
babeld/babeld.h
bfdd/bfd.c
bfdd/bfd.h
bfdd/bfd_packet.c
bfdd/control.c
bfdd/dplane.c
bgpd/bgp_bmp.c
bgpd/bgp_bmp.h
bgpd/bgp_conditional_adv.c
bgpd/bgp_damp.c
bgpd/bgp_damp.h
bgpd/bgp_dump.c
bgpd/bgp_evpn_mh.c
bgpd/bgp_evpn_mh.h
bgpd/bgp_fsm.c
bgpd/bgp_fsm.h
bgpd/bgp_io.c
bgpd/bgp_labelpool.c
bgpd/bgp_network.c
bgpd/bgp_network.h
bgpd/bgp_nht.c
bgpd/bgp_packet.c
bgpd/bgp_packet.h
bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/bgp_routemap.c
bgpd/bgp_rpki.c
bgpd/bgp_table.h
bgpd/bgp_updgrp.c
bgpd/bgp_updgrp.h
bgpd/bgp_updgrp_adv.c
bgpd/bgp_vty.c
bgpd/bgp_zebra.c
bgpd/bgpd.c
bgpd/bgpd.h
bgpd/rfapi/rfapi_import.c
bgpd/rfapi/rfapi_monitor.c
bgpd/rfapi/rfapi_monitor.h
bgpd/rfapi/rfapi_rib.c
bgpd/rfapi/rfapi_rib.h
bgpd/rfapi/rfapi_vty.c
bgpd/rfapi/vnc_export_bgp.c
bgpd/rfapi/vnc_export_table.h
doc/developer/logging.rst
doc/developer/process-architecture.rst
doc/developer/rcu.rst
eigrpd/eigrp_filter.c
eigrpd/eigrp_filter.h
eigrpd/eigrp_hello.c
eigrpd/eigrp_neighbor.c
eigrpd/eigrp_neighbor.h
eigrpd/eigrp_network.h
eigrpd/eigrp_packet.c
eigrpd/eigrp_packet.h
eigrpd/eigrp_structs.h
eigrpd/eigrp_update.c
isisd/fabricd.c
isisd/isis_adjacency.c
isisd/isis_adjacency.h
isisd/isis_circuit.h
isisd/isis_dr.c
isisd/isis_dr.h
isisd/isis_dynhn.c
isisd/isis_events.c
isisd/isis_events.h
isisd/isis_ldp_sync.c
isisd/isis_lfa.c
isisd/isis_lsp.c
isisd/isis_lsp.h
isisd/isis_main.c
isisd/isis_pdu.c
isisd/isis_pdu.h
isisd/isis_spf.c
isisd/isis_sr.c
isisd/isis_sr.h
isisd/isis_tx_queue.c
isisd/isisd.c
isisd/isisd.h
ldpd/accept.c
ldpd/adjacency.c
ldpd/control.c
ldpd/interface.c
ldpd/lde.c
ldpd/lde.h
ldpd/lde_lib.c
ldpd/ldpd.c
ldpd/ldpd.h
ldpd/ldpe.c
ldpd/ldpe.h
ldpd/neighbor.c
ldpd/packet.c
lib/agentx.c
lib/bfd.c
lib/event.c
lib/event.h
lib/frr_pthread.c
lib/frr_zmq.c
lib/frr_zmq.h
lib/grammar_sandbox_main.c
lib/ldp_sync.h
lib/libfrr.c
lib/libfrr.h
lib/libfrr_trace.h
lib/log.c
lib/mgmt_be_client.c
lib/mgmt_fe_client.c
lib/northbound_cli.c
lib/northbound_confd.c
lib/northbound_grpc.cpp
lib/northbound_sysrepo.c
lib/pullwr.c
lib/resolver.c
lib/resolver.h
lib/sigevent.c
lib/spf_backoff.c
lib/systemd.c
lib/vty.c
lib/vty.h
lib/wheel.c
lib/wheel.h
lib/workqueue.c
lib/workqueue.h
lib/yang.h
lib/zclient.c
lib/zclient.h
lib/zlog.c
lib/zlog_5424.c
lib/zlog_5424.h
mgmtd/mgmt_be_adapter.c
mgmtd/mgmt_be_adapter.h
mgmtd/mgmt_be_server.c
mgmtd/mgmt_fe_adapter.c
mgmtd/mgmt_fe_adapter.h
mgmtd/mgmt_fe_server.c
mgmtd/mgmt_txn.c
nhrpd/netlink_arp.c
nhrpd/nhrp_cache.c
nhrpd/nhrp_event.c
nhrpd/nhrp_multicast.c
nhrpd/nhrp_nhs.c
nhrpd/nhrp_packet.c
nhrpd/nhrp_peer.c
nhrpd/nhrp_shortcut.c
nhrpd/nhrpd.h
nhrpd/vici.c
ospf6d/ospf6_area.h
ospf6d/ospf6_asbr.c
ospf6d/ospf6_gr.c
ospf6d/ospf6_gr_helper.c
ospf6d/ospf6_interface.c
ospf6d/ospf6_interface.h
ospf6d/ospf6_intra.c
ospf6d/ospf6_intra.h
ospf6d/ospf6_lsa.c
ospf6d/ospf6_lsa.h
ospf6d/ospf6_message.c
ospf6d/ospf6_message.h
ospf6d/ospf6_neighbor.c
ospf6d/ospf6_neighbor.h
ospf6d/ospf6_nssa.c
ospf6d/ospf6_spf.c
ospf6d/ospf6_top.c
ospf6d/ospf6_top.h
ospfclient/ospfclient.c
ospfd/ospf_abr.c
ospfd/ospf_apiserver.c
ospfd/ospf_apiserver.h
ospfd/ospf_asbr.c
ospfd/ospf_ase.c
ospfd/ospf_dump.c
ospfd/ospf_dump.h
ospfd/ospf_gr.c
ospfd/ospf_gr.h
ospfd/ospf_gr_helper.c
ospfd/ospf_interface.h
ospfd/ospf_ism.c
ospfd/ospf_ism.h
ospfd/ospf_ldp_sync.c
ospfd/ospf_lsa.c
ospfd/ospf_lsa.h
ospfd/ospf_neighbor.h
ospfd/ospf_nsm.c
ospfd/ospf_nsm.h
ospfd/ospf_opaque.c
ospfd/ospf_packet.c
ospfd/ospf_packet.h
ospfd/ospf_spf.c
ospfd/ospf_sr.c
ospfd/ospf_sr.h
ospfd/ospf_zebra.c
ospfd/ospfd.c
ospfd/ospfd.h
pathd/path_pcep_controller.c
pathd/path_pcep_controller.h
pathd/path_pcep_lib.c
pathd/path_pcep_pcc.h
pathd/path_ted.c
pathd/path_ted.h
pathd/pathd.c
pathd/pathd.h
pimd/pim6_mld.c
pimd/pim6_mld.h
pimd/pim_assert.c
pimd/pim_bsm.c
pimd/pim_bsm.h
pimd/pim_iface.h
pimd/pim_ifchannel.c
pimd/pim_ifchannel.h
pimd/pim_igmp.c
pimd/pim_igmp.h
pimd/pim_igmpv3.c
pimd/pim_instance.h
pimd/pim_mlag.c
pimd/pim_mroute.c
pimd/pim_msdp.c
pimd/pim_msdp.h
pimd/pim_msdp_packet.c
pimd/pim_msdp_packet.h
pimd/pim_msdp_socket.c
pimd/pim_neighbor.c
pimd/pim_neighbor.h
pimd/pim_pim.c
pimd/pim_register.c
pimd/pim_ssmpingd.c
pimd/pim_ssmpingd.h
pimd/pim_time.c
pimd/pim_time.h
pimd/pim_upstream.c
pimd/pim_upstream.h
pimd/pim_vxlan.c
pimd/pim_vxlan.h
pimd/pim_zebra.c
pimd/pim_zlookup.c
pimd/pim_zpthread.c
ripd/rip_interface.c
ripd/rip_peer.c
ripd/ripd.c
ripd/ripd.h
ripngd/ripng_interface.c
ripngd/ripng_peer.c
ripngd/ripngd.c
ripngd/ripngd.h
sharpd/sharp_logpump.c
tests/bgpd/test_packet.c
tests/helpers/c/main.c
tests/isisd/test_isis_spf.c
tests/lib/cli/common_cli.c
tests/lib/northbound/test_oper_data.c
tests/lib/test_grpc.cpp
tests/lib/test_heavy_thread.c
tests/lib/test_segv.c
tests/lib/test_sig.c
tests/lib/test_timer_correctness.c
tests/lib/test_timer_performance.c
tests/lib/test_zmq.c
tests/ospfd/test_ospf_spf.c
vrrpd/vrrp.c
vrrpd/vrrp.h
vtysh/vtysh.c
vtysh/vtysh_main.c
watchfrr/watchfrr.c
zebra/dplane_fpm_nl.c
zebra/interface.c
zebra/interface.h
zebra/irdp.h
zebra/irdp_main.c
zebra/irdp_packet.c
zebra/kernel_netlink.c
zebra/kernel_socket.c
zebra/main.c
zebra/rib.h
zebra/rtadv.c
zebra/rtadv.h
zebra/zebra_dplane.c
zebra/zebra_evpn_mac.c
zebra/zebra_evpn_mac.h
zebra/zebra_evpn_mh.c
zebra/zebra_evpn_mh.h
zebra/zebra_evpn_neigh.c
zebra/zebra_evpn_neigh.h
zebra/zebra_fpm.c
zebra/zebra_gr.c
zebra/zebra_mlag.c
zebra/zebra_mlag_private.c
zebra/zebra_netns_notify.c
zebra/zebra_nhg.c
zebra/zebra_nhg.h
zebra/zebra_ns.h
zebra/zebra_opaque.c
zebra/zebra_ptm.c
zebra/zebra_ptm.h
zebra/zebra_pw.c
zebra/zebra_pw.h
zebra/zebra_rib.c
zebra/zebra_routemap.c
zebra/zebra_router.h
zebra/zserv.c
zebra/zserv.h

index 5104155936638b75dd19ec553fffb1993ad9728e..1cd913c766893c7b27627a9c811680b11ff118f1 100644 (file)
@@ -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);
index a9ffb7ee435ad4cc49cff9eee6434b116acfe893..6c51af48a89572c97f56a29c90c62ad87555afe0 100644 (file)
@@ -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;
 };
index 2586c0b99cade13a8b1f2a4f46c0cd47b72973ff..0ca2ca1f024b4d73bff2f62d3da7da73e4fdd1a8 100644 (file)
@@ -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);
 
index 97e45bb2c2c53a100c8108e6f4a370a4e76b923c..59b0494aa5f94cc07bfa7867f32a636afa3690cf 100644 (file)
@@ -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;
 
index 88a9310bc6cc09c64a701ce2f73726884ab3e24d..05ed2702d0bade028f513829eae13e352a5eef79 100644 (file)
@@ -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;
index a11ed3d895f134f1f84b77097de70259920f793d..db9778a8eb0bf0704c1210e36c157dc92e374848 100644 (file)
@@ -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;
index 7d160e868a9da510eb301ff2855212bcad0b07ec..b2c52f543f52fe4b23eb8c934c952e7174c4190c 100644 (file)
@@ -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;
index 6ade0fc38890269405d65f5d986fcce063364516..1cce0d7df69932f64488e056ba788898a8a11361 100644 (file)
@@ -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;
index 0c909e139bce6452ae283c2531706d8a366a20e2..ab7463fadcad9c2338198e2d82dc13e76341112e 100644 (file)
@@ -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;
index 051e336e525b063f7e7a83b9c7e05c7318a8fee5..9818538454b34ef409bd085ffed00d1b9edb4560 100644 (file)
@@ -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;
index ba16a33fb9a6937c17553c8bf208cda9a558325c..e8dca2a75fb398f5b281f7fcef9b16ece608a88d 100644 (file)
@@ -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;
index 129e444164569aaaf930b7944f2bd64df6df87d0..5708e6fd55d9274ea601a735c653a4298c00674d 100644 (file)
@@ -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;
index 6aad4ff2a7cbb2c598feb8cdf7239d7430c069c3..25e921cff263981dc4c036ca5718622cdcef823f 100644 (file)
@@ -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);
index 1f3dfd656eff25a7086903314f4be8bfb7515ff5..bdee8a2fbd450ab406bf79b932cb9e5733442249 100644 (file)
@@ -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;
index 613fece4d45e3cb2aff154dd10b2dce3a6f77b90..ee1f74989b7798ea2c4cdc6a113cb2a61e2c6934 100644 (file)
@@ -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
index dc6ce6b8eb926b1d5e59b8d0400b46d2c71c834f..79f0444e842f5e791d54b6bf1aa9b0d411d19c8c 100644 (file)
@@ -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;
index bd1a6adfe8740a57a4f225e97480b2d169710e2a..432072edebf1394d7e075cc81e46ac217b584a93 100644 (file)
  * 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[];
index 5dae39d40caa9eb68576489cc0f48a3f8d01be01..6b8ae844812c6d03446901e73ce0a524bb36563a 100644 (file)
@@ -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 */
index f0f207442ea6e1067593d1e4784c48fee0957cfb..e04fb6eb23892b151e6dc58d2ba65548c146a445 100644 (file)
@@ -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;
 
index 8fcb5b017e3a80eeee830fdfd0480d3fffba029d..c10f33a2d978cb344352aff11500bc235ea6d2c7 100644 (file)
@@ -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;
index f21b219e29715f25cc9b2f232b200e25f211245b..cf0b4362c533a81a88f178e86e3ef60a9056242f 100644 (file)
@@ -11,7 +11,7 @@
 struct bgp_listener {
        int fd;
        union sockunion su;
-       struct thread *thread;
+       struct event *thread;
        struct bgp *bgp;
        char *name;
 };
index cb9de84cc58812ee73749eac8c04254f6efd5b95..391332f4c2f11912a9381d91d891b23f504c085b 100644 (file)
@@ -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);
index 97b26ea62a27c8e6c6d1b7788bd11dc5f4bc40a8..e124095913e959b1a483ab9ebfec2c6ec8180489 100644 (file)
@@ -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;
index 2eb5693ae23578b7f4f6bc938f85f50489bbb49c..c072bbc235160a4e8b6c90ea6ff6616f0168a2b2 100644 (file)
@@ -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);
index efa367a56d3b833eb5de377510b0556c313ce3c7..3dcddf49ea98871aff755e73105e39a9900a01c8 100644 (file)
@@ -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;
index c45dcaa5169d106770ea1640ed18d04146b5889b..b48e8eda1125a5bd4437461fd1b10c5fd3a895c3 100644 (file)
@@ -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 */
index fa9d23874c8ecf1a9160234b23d7284434011225..db4d1707315336758cef304a670eb9783064278d 100644 (file)
@@ -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);
 }
index 2aceca8bd7108db4122c38d49fe814457c6098e7..efaa3c3636ea9f64131e1975425ac612ad3f3c75 100644 (file)
@@ -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.");
index 997efee9f3368355d9c4e339316bad5d1b09459e..9027af5ba326ad4b2eb7f221c5ee7dec8ade63d7 100644 (file)
@@ -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;
index 68bfb4c13987d442e70bebb9b112653ac4b61133..e01df10d3e59327f11d2b8f0b41196bd088e934b 100644 (file)
@@ -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";
index 2b2fadcdf402257abc4e69e862ee09d352c106c1..67c384ba021e75d4349f3126338a2bed286e95ae 100644 (file)
@@ -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,
index 181d57813d22f56edb65d341dec1b0ed5b13c540..f6321a368f27b5c24d961b567d856d2fe75ee396 100644 (file)
@@ -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;
index 3bc64c34991486945d164f22059729057357ada7..42334884962c17f65d19c7220d49716cfc785a55 100644 (file)
@@ -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;
index d4c98a2c73072c62022f4ccc689a96cf28893cad..11761ff58e40c8fc2a4f8cba042805fc322d8dfe 100644 (file)
@@ -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;
index c7cd80b98438407ac9bb248abef9e83eec198b80..6a71d9dfe2c359c7b8e04d30c9bf1b7589eed986 100644 (file)
@@ -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)
index c0dd8d5ef410fcb16b06d0ff2312b6e14c70a3a3..ff93e0ee5e7110754e5bc124db4a8740ad5fad8b 100644 (file)
@@ -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);
 
index 5fb2c5046df95a597474a4d9c6d397c7930b3a6a..92b580ee1276927eea36df81b9630c1996a18c10 100644 (file)
@@ -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);
 
index f169a7808c5bc03837c2b31449a18407bc218799..c69161841c8d3c0983d98605c00252cba0f7029f 100644 (file)
@@ -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);
 
index 68ba5a48d869c0b6b9a830ee3f60f9bd6c01360a..3200079b39073af4d19a0c58b8d2f7c1e476701f 100644 (file)
@@ -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;
 };
 
 /*
index f727f24f1d0013a9d0993d787ffb97ee566b1d6d..7000fbf90c4cd3d8384fad46e637126609286429 100644 (file)
@@ -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);
 
index 1b626bd2e18b895205421991a9e3aca97cd6f5c7..5fa838bd34f71a025db1854e23180c1c8504bdda 100644 (file)
@@ -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;
 };
 
 /*
index 2b768b8f8d788180a57fbf83f1da40b7542a13fb..b907c24c3dab743dfe6933ccf72b1ca87089d1c7 100644 (file)
@@ -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
index 5449220448590a771e8784e698849f68e0f951fe..ef943fa4072240c95fd59fe0e5cbd222dac25f0b 100644 (file)
@@ -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);
index 5716570cb00fdd1266e562e2aad71fec724f013b..957e0432ef38134613e9b32d35b2cd91d8fb0e6e 100644 (file)
@@ -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,
index e262f6af9421f418d3bc80f063877d51e0cb9679..b7021b69a12acd8f63294daffa9ca0d1545ca5a8 100644 (file)
@@ -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
 
index 4f6cfcc7c59adbc177b496a3825f7f7ca446f599..0773f47b09f2305a3c2113c10b083bc8bd19cf8a 100644 (file)
@@ -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()``
index ac4405121ea8c33e60ec885f8e21c50cab0de798..4fd56587ae8598e87573b9935fad0816760568c9 100644 (file)
@@ -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.
 
index 534b4fef56491ae46733926ea9168bfae1004ebc..a4d59db6b7cf0b1dc4a7d7a8f7fef374c85d8ca1 100644 (file)
@@ -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;
 
index 493ba08f7d7e3d51378ad4aa0914004df170c618..dc8af8f5353873a6deac687f62c55166c32b33d9 100644 (file)
@@ -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_ */
index 55f0a3269ffb930aa619673cbeb3aab9cc578b7e..c6d3b879d9d5cd3a068a73306a6e95969f74d3f2 100644 (file)
@@ -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;
 
index f427067b3653beec4a83758e73784879a724be07..582428ed1fc873964bac0e997229285a07ea9ce6 100644 (file)
@@ -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;
index 5c9e44e2b96df3b64ef5698a9ccc9498854cd327..2ccc89cf3a7e4126525277479f985bf04b4512be 100644 (file)
@@ -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);
index 33d91c2fbf7d1e5ded0c1ea3dff9152ba7b8589d..ac5c47f6f98bbab97233b6ee8049df2c3d7c4021 100644 (file)
@@ -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);
index 02fb3d23b84aed5f652a0f0b706eb5900037c74c..24603fa743a75f9128ef40bb569b4e4687f6ad3c 100644 (file)
@@ -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);
index 4c1cfd48289baf8312da339b2b8f5bf79b70fa0c..6a0360ed80fb441ccb33e9a00b170d5505435d0d 100644 (file)
@@ -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,
index 9c88e34f6cab4fe8f7210e208ba85fb19c1e6a2e..8735c48661452ff22657e02ba78ed35cbe235109 100644 (file)
@@ -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;
index 6d4b3eb8e9f7972eebb9f0a0bc4560ba63fa3928..ccc0c9a4b244afc4f9fff52c5ed5cba1a26c4588 100644 (file)
@@ -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;
 
index 64734f8628efb5fb0f172b09e648dd8a29493168..40cc158812050da9009c5f598e766286246d1c26 100644 (file)
@@ -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;
index 16def982b791d3c4fe8b1a047a7a54fed8454804..3eb4e0e8f81b97759483df1ff1080a050b547362 100644 (file)
@@ -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;
 
index c260ce78de0ff5871ab8e8e08cf9cb2114f2d57d..f02f7a68eac6a9c6a3e793adf7fe974dce2c6052 100644 (file)
@@ -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 */
index df977893eecf9b03c204fa8d7357133ac1787db0..7acde419fcfae002ac954751446aa3d60df5a053 100644 (file)
@@ -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 */
index 5b236a66d7d3a35c7828d5a2cd36094b034b5a92..8949318cc4bbc059bfcbd4524f3418a0e30d7f17 100644 (file)
@@ -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);
 
index 2b9bf60ffa797d10fc8e979b090f97dda953475b..135916a4cb07b1611a82ddf1b55a50c8065c5c64 100644 (file)
@@ -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);
index 667a90c2cfe51233864e7869b705462a7aeabe3f..78197561bde4611547a20262774ddc5e1a1c47f3 100644 (file)
@@ -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;
index 87b6061b5882599ffd1c1f6974055a37bde3edf4..9baf58650d55b2b1a4ff7d69c0f46ef76c8356fa 100644 (file)
@@ -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;
 
index e827f75a832f065d535c7230ce624b9c5bce94ae..a0ac964fab580e74492101ba6689d9ca15ac23f1 100644 (file)
@@ -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
index 497906aaeca7a9668cb81c59679ce13bb1e1e7ae..7ba04a1c178a9c9905211f8d11eccaf1709cee91 100644 (file)
@@ -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;
index 599dca12987ec2de8c25e5e4df3e00c747501b9c..4d2d545683d16cefb6878f4f842633c2d4429894 100644 (file)
@@ -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);
 
index 59cedec706c0dc33bfd17f08f9f525f05899119b..1498bbc0eae6276efcf5230f02009d43f6e06f1f 100644 (file)
@@ -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;
index 5bb2b949c7a9a7c98278d01525fe4129c8015969..3839a9504c05e807cf0e4999b269777cf0046d84 100644 (file)
@@ -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) \
index 99a18fc31c8930ead02d87246fad6e2f2ff66e8e..ad5ec9f89e5e0669111a1156a9ac8a72ed8c1969 100644 (file)
@@ -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;
index ec1b8d2686ef3ea0fda12560517f93425a7823e5..9965b2273208979c82aa61c4d2ecc14d575d1e19 100644 (file)
@@ -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;
 
index 512439400069ae6fadd5595c13e64e6cf6a3cb44..ccd89a70f1b0676c74b761bfa7cfd1300ed590d7 100644 (file)
@@ -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);
index 90f5ff69a2cea7374133c4b8399cbd7cbfd8c236..feb2d235b8dabffa287593f62dc976e560f9f07b 100644 (file)
@@ -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;
index 429399165487213acdf1bdb7cd33a71a61acee3a..59209d3aca5d554afc38b041d50b2e5d5b3c6ba6 100644 (file)
@@ -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;
 
index 627f1fb748845d1ba899981393f9a6e6eb0ed247..4ced5f4e83ffd5fd48650452eef67277079f7352 100644 (file)
@@ -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;
index eada0d55210f7bf6dc7d39aa48a25bae961f6b6a..42e1d68e03c829fa194603e4e91e05d6a1111e13 100644 (file)
@@ -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;
index ee402dad93e464e75beb9f3c774ad773038a139a..73049d208396fd0b9b2ec0a6032ecc1d9aa66170 100644 (file)
@@ -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));
index 37a36fd37ac82780dff5aab4abf121d5e712020e..b86759af963701b9a058304f543813a9e59516fa 100644 (file)
@@ -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];
 
index 170c079b52cc758889ee4391722c8fbddb1c5843..6151c1a0b6c707b55905162e51a0eeac8bde4f60 100644 (file)
 
 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;
 
index 42c3ef05351aec8855156e4b319bc0d2e48d9722..36c14a5622c97dd295c684d324f23408c3734c85 100644 (file)
 #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);
 
index b1260feb68a47906cbd89944825911fb20296bcb..2313e232fe1e8778c794f2b49484c6968eac2c9b 100644 (file)
 
 #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;
index 5d1859298ea91202d4f20fc69f0c53ad03b62faa..6996bf7c103b9bb625d40607ec16947608183fc8 100644 (file)
@@ -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);
 
index 325b33d057c5055e636ad6ab85cd6fb0d3330985..3a38e165cc53b0f770aa5d3618a6803f3eb71dd2 100644 (file)
@@ -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();
 }
index 3a64f0d3b9dced63e1d5b58541b0e0f0857e69e3..2688b6a86bcb08b462f0d24379c0ea7e1c598093 100644 (file)
@@ -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);
 
index d737e9f4166a2fd1aa9f2b4fcd90763b75b90a60..62d06dfb19c364c08d9d3b5e0a1bdfe1e35f375f 100644 (file)
@@ -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;
index 2026a7857c6c165ce83fbe3bb515d303c789a40b..f549b34ee26c2ef6eff2ccd9e786721075c92d99 100644 (file)
@@ -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);
index cbf91655388bd5a2011627c9674c99703a137d84..4f20989c05b98e36c616bdb71f6d10d53c86734d 100644 (file)
 
 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);
index f53dc72540651cadcb213b0778d396f295540164..61a1a2aa81346c26990a5ecca290dfd653987163 100644 (file)
 #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);
 
index e799538b628290bcb464da49c83257ef43de4089..f310ba5dd2098ae755065835b6fd7d049c07a975 100644 (file)
@@ -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);
index 831f2a6aba89b087fda97cb1bb4fb4e9882bedf4..e1c9e6337521ffb4ba26adb9f278eb57fa38d971 100644 (file)
@@ -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;
index a253ef4660873f4f9ef9e26caf1f4ba3a091f99b..6770ab73ef3ec4f69904d6272d607a3b7cc561d8 100644 (file)
 
 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;
index 2f45ae83326e6b02e8d79d5c365ba14bb1770248..a17ee17253ea4654e830423bc7bbe9f25a79534d 100644 (file)
@@ -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);
                }
index c430b1d7efd982aea9b3ce8145d0b724846d3b8d..04f1c27b85d3ea5393aee4ced21c0665cec20701 100644 (file)
--- 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;
index b0f901ab0e92abe8116e2afa03eb773a6194bc01..266670e396c1d2ffe20a72a94ddb30422c8e4272 100644 (file)
@@ -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') {
index 128d11b6ebbddcb2dfb7a0b2b6b3a0d28dbb64ba..e1d3ad68ab397569971e2260321a6e9b048012cc 100644 (file)
@@ -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
index 0c617238fa1fa71d29297f95761f5651d46cf130..9f026868dbc53553cad28078b4904e8a3f528668 100644 (file)
@@ -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)) {
index 525e49942cc5fb13ad076a68f5dcb6e777d72696..30c51230cb46e47498a0fadf91a4eba3429ed9e0 100644 (file)
@@ -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;
index bfc1e93b16392f39317378b1aa77c030f778ce84..d90088edb259fa81f9c38d5051703db0224cbc47 100644 (file)
@@ -26,7 +26,7 @@ extern "C" {
 
 /* callback integration */
 struct cb_core {
-       struct thread *thread;
+       struct event *thread;
        void *arg;
 
        bool cancelled;
index cdb1c3adb449152e07c843e75064d6c3977d1a34..261a130632aea4b83e04142c9a610380515e325f 100644 (file)
@@ -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);
index 5b6ebbf887a6b839d53887b7aca49b130d379f83..f7601ebf9d2f7ad85ab694b460dde28d497fd59f 100644 (file)
@@ -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 */
 };
 
index d1b7dd133e61ee3ed3c1fb92f6aa3bcb1a3cd558..433e9cb1488ac0a7f2fd902277583cb74067bdea 100644 (file)
@@ -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);
 }
index 3657346507f514f9d0172ac6c0bb8a607824c358..5463222d7bde62a6f88eb0041fe1015fbc7de959 100644 (file)
@@ -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;
index d13cdc20b13be51708017b358da8085ec035a908..2a1bb2f6c3dff60ea880b8df4a2f039b4bb6b0b2 100644 (file)
@@ -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(
index f7ab86fd9db140d7119af7d4484243267e6fea6a..00b897dca1f241a8b0884cbea635273f742374bb 100644 (file)
--- 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)
index bb45024d0eea86307671bdd0794405c3f98b96f7..b70c00635dcd7cd71b4419c17ac1fcab17991f3c 100644 (file)
@@ -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));
 }
index 36249221245d07d78ed772cba1cf7b872ca85e7b..c0d897ab2c9174d3df6e28c53678261dda902c3d 100644 (file)
@@ -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));
 }
index 281d9a4704eb959328be8c970d03ad3be95ba594..6d0ee100bc2fa5cc801605745bf4847699c10dbb 100644 (file)
@@ -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);
 
index ee19568516f81017a00e84306a317a8feb169314..f0084e576b36f56067b09a6d4db9d078c28479b3 100644 (file)
@@ -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);
index d68e22368c8537395e572d30ed3fce01586b9436..4de2b0e3396f859e9461fc7d51b286daf7b1e65c 100644 (file)
@@ -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;
index 337fb690d1d8f7c89aa48c13f5d801f754202685..9b0d2817d7e8bf0772015876f748cc76aad93b3a 100644 (file)
@@ -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);
index 5bc566c285d9cec92fca14770591273e50086c5c..de07ca16812a646762257cc03d6545da2cc8b34c 100644 (file)
@@ -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];
index ffc84e5fe85dbd2f4e0b1275a6e0a7b873399f39..c455b9bd2a20e5044828d9267f1ce142e60b8435 100644 (file)
@@ -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,
index 764e3e72aeee0aeb606cf23214d4c57aaf5b665a..6e69fa263d63c43f9ace251121287631b5b507bc 100644 (file)
@@ -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);
index 3ed34894e5059c242c706f03d1abeaeda89500af..40da4f3fce6d73066f449384d2c5557a9252788e 100644 (file)
@@ -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;
 
index 36b059a990eea5ba6f95c5ac58c63f8db07ffdc1..b77f782ee50d3a8ed0a092f1f84febf8af945d59 100644 (file)
@@ -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);
 
index 458bea5144e7ce4dd7992f7c5afad362746070ca..14a09362dda4edd7c11a64214e4dea5bf417eb8f 100644 (file)
@@ -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");
 
index c6bc29d968598de14046c28a17d42010d1b89da1..aaf7db0f808de430af1aa26cda29692f4ae465f4 100644 (file)
--- 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;
 
index 52453d0daae2432de452386fc4188f84b69a7b40..856c352be523f82ea83be6e1733f99e6a3b20d8b 100644 (file)
--- 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];
index bd12105a3fa27f57d58f3b835bf17dcbaca4bb0f..363b27ab13568880b44cff37e908bf521f89d975 100644 (file)
@@ -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;
 
index 9aa808cdfdb74a98b27abbfa5a87fd1502923faa..f4e72af9d7b9500af7b33bcd45feb7ce9b05e7d6 100644 (file)
@@ -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
         */
index e1ab4c48d170f8ae51a597ed61e33b8bab7f1980..50a0ad388cf4d4b83bd1075bb1f88b649e848744 100644 (file)
@@ -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;
index c7ed14b0563eba133b5e46925bd2855d46c26f74..f3c8fc81387fa860f18113f4f68cba58fe447455 100644 (file)
@@ -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);
 
index 91cd641ce84ac40cf0a6a412fa70e2822d1da2ea..654c246f0dc99f47e3e0110ad091d628199a832b 100644 (file)
@@ -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);
index 2cd80cc58567dc548e592eba65b6821ff266c0d8..bb5d66df5dc7423ba14b972a551f5a6f5f8e5559 100644 (file)
@@ -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;
index 53c7038c8874dd68e7c4d6560f6d498fba667032..5daae3f5bfca68f075db1f4504126e87f0b23752 100644 (file)
@@ -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 */
index d379ff8d3d3830a3a7b6cd23a051ef42c650e0b7..618325d09d8e4815fb85b06357dac26c04361a0d 100644 (file)
@@ -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;
 
index 23cad003447e6063181a78f532b891450f43fd13..14b6396b84ec6e9c5de3a4c7d8fba4bf13aec933 100644 (file)
@@ -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);
index 377e7be2207d39736100b515aa23a0a2e40c6ff2..e8a15bd49b07b23c73acc8e56def1d49f0b34cb2 100644 (file)
@@ -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;
index 22c0c4c044e0ddfff1a828c2c49132b64e85fb66..c1a9fadb4bb98039d0a405d16153c4674048b51d 100644 (file)
@@ -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;
 
index 7f57233d3536348b17d85f500feeb7e689a63be4..6c34e50664276beaf03fba83f16a00ee374b06e5 100644 (file)
@@ -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;
index 6997fdcf81f8ce8faac5d0ef8edc0bcb30a0f905..1fcc6bd6a1efa972eb6f9f5209cbb899bde2974b 100644 (file)
 
 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;
index 6b4f09d9b2bc47df713de93acf0c46995a9cb09a..eaa50367cb488485f67871b0176c3bcbf5fed1a1 100644 (file)
@@ -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;
 
index 3389234a3f4b0136a1b15818bdc9812fd9dcf25d..342b766f24fdb2d8b073ff929870de6d8267f02b 100644 (file)
@@ -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];
index 0b0a56ea65c6efa55d7167ac1cfa1719d5797dd6..6996070fa3d7e4767fcebb4951d378565e815192 100644 (file)
 
 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;
index 7ae720bc5f1b6d4d65e6f1cf545f86dc9e44b4e0..bbc210614fdfb2dc9752755870bf10f1fe28649c 100644 (file)
@@ -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;
 
index 552730d123c99a3e420c9fe4f49b075429bc6551..485aae74222bec08313c5f074e2b650e12e34ee7 100644 (file)
@@ -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);
index ac1c8f9eb96fbff80453e4cc07efb59eab5209de..cb50dd52d94fd54a4da108f0dd59ebcafa178735 100644 (file)
@@ -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;
index 25f5a701bcd5b46e9617a95a336280e42fa09f7c..ad98da9baa0b4f344253997aca3a9e4e1014610c 100644 (file)
@@ -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;
index e37dfb5d8b8dc07fce26a8ce939270adf770e657..db85d550c2108bccbff5e2d16c41092688689221 100644 (file)
@@ -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);
index 358d1b94c521c79f86010e81833476cd0a6e7d01..c6a6b8e75db2f1f7419278b52e863c0993439740 100644 (file)
@@ -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);
 
index d201eb6cc066c81b1181b810d3b3c57b43c176ba..650b3ab8755c0dcbb95b77152e1b4700d638e90c 100644 (file)
@@ -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;
index 25ce59a401287ee975b197e3da3f3f937cda0947..95694a41fd85110cbf7bb8abafb0d8db2d298d1a 100644 (file)
@@ -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;
index e5516ba727b2d3e4311ab907daa7f8dc4bfd09d0..b1e2b7cea4478eefd57fb2408e7f170922da883d 100644 (file)
@@ -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;
index c01296bee5f1cf01eadc5a407ca0453bff9f8b82..9428222712abb03b9120c4d618e0ad899ac8a734 100644 (file)
@@ -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;
index 880e0c253faedafc0dc1c87012489170c0776b9b..02e36d2e6ae763874248c076d4de0bc1e6225aea 100644 (file)
@@ -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;
index 62b32d3762260c02226b2fd50be1c3a0b81b0158..d9afd65d81275c14e8eb56daf81781fd9a55c8b9 100644 (file)
@@ -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 */
index 8924c00a58658f2468fb682a3598c5c7de0708d0..a2e77d922857eea88db19b9c78f2df88fef286ad 100644 (file)
@@ -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;
index 847531361eaaa9cc9fb1f7e998108eab633ccccc..b3f485915851b3459e2488440cba7de6a2319a8f 100644 (file)
@@ -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);
 
index 3df0580fcd4cfc8b41feb1322cb039bc09dd1b29..fb710cc1cddc1d457ae7e58c2d40953fe956a354 100644 (file)
@@ -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);
 
index 5f0c3cf934e2d36361ad01e6a29b6e0309258ca6..f465d876308a28a011819fb07b942fcb197dfd3d 100644 (file)
@@ -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;
index e04842a7c8a8b655570e97f0f880238fe57cba11..ae0744b25da21edfe320613bdcef16abf64d61eb 100644 (file)
@@ -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);
index d57e56bb3704dbc8ebeb1f9177f3e3bd3bedcbce..821ace89e90d4fd04f5cd84b46c0a1a6f914ee01 100644 (file)
@@ -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;
 
index 79b5eb0ed9b0e859ee422db0add583ed27b271b8..f4b392f4663ca1be9c6bd2777863dc77b3535f27 100644 (file)
@@ -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,
index d93115adc14bce088610cbb98284e97f226b6fd0..508cb6f5e0125a3d4a4e77770ed36641afb3e20c 100644 (file)
@@ -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,
index acb24d791d215166450df4cb5e49f6ecdd4ccbab..be7b94f3d3b0cc714dad6f548c4bb1cf33a426e2 100644 (file)
@@ -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);
index 45d03bafe7ab81d5e93ea738e3e3b64d17f13d2d..1d3d1f7e6fc101c7e76fca72353c53655e668ed5 100644 (file)
@@ -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;
index 1f6a7e86e037a87b0e466197f25ddf7edfd0a9bb..2b25b074457be6d55e3151a959788df2bf5c57c6 100644 (file)
@@ -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);
index c90603e1ad616fedbf9cdf1e9cea1ffe04665483..95c8f189d05d5509507b2004498a6abe84b40e9c 100644 (file)
@@ -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;
 
index d9abd1ff94f2f7ccab87d2c93cdd3c61dd7ef90b..5ec754d3a4c23b2b9994f319e24f3fd242b31db1 100644 (file)
@@ -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);
index cd3b742def8e317fb04dea47ff216401e74b8f98..6bae9b6175f5d746027937084174299deaa3933e 100644 (file)
@@ -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);
 
index 474cca0f3cff96a94562c2c5d64c5004ac706477..d2366be46854e7c0a33a4a0d16327d4977f111f2 100644 (file)
@@ -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;
index 029848386306c7e4e041bbea523513833216f50b..ad4e58ae241fb852bcba7938ce389657c54ace80 100644 (file)
@@ -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;
index 08595a69d0c2f9b661fcd425473f29c5e00aab8c..73c875124a25edb32381bf339df1287eb378d675 100644 (file)
@@ -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;
index 970a039d8182035f34558cc86ae225ff657b45a0..2c554c9b76c618248369ba6e7f62ca7cd6a10276 100644 (file)
@@ -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;
 
index 91f4d77a860ab5d44391c6b02a968ab6beb22b66..aa1798ff98743772228aeab76a33381910509b0d 100644 (file)
@@ -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);
 
index cc1ca6647059bc82b9e760b261b3b444bc4f728c..56731b751ab78efb5cf383bdf111b89fcfe2bd69 100644 (file)
@@ -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;
index a90d18573b8ad0650df3138ab7f0eba065ce85db..0aaf67c1f3cd12dba1f068acf9a9f2ebe9235e4c 100644 (file)
@@ -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);
 
index 85b5377e5fc6cd2585e5571e2b340be6b58d9254..19f422d61387a42fdb113b84157c1ca89bbdd8a6 100644 (file)
@@ -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;
index ad7dac0abdde136db5b2c861e93e5374741ba43c..61f87bb2d0f98e07d6cb5e43c2d64f5fa46d31e6 100644 (file)
@@ -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;
index d712d7b5fea05680ea7a5794f913d6ae0aa8b935..22d67c406bbe1b4d524c81eef17d1086039985f9 100644 (file)
@@ -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)
index 0f217971eecd7a4dbad6de3f3631472980a17092..2a58c86302d5353dea3546b56afd36f98dd6fdf8 100644 (file)
@@ -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);
index e83ff1dccf20ef040d941cd4d84e2b0cd52188a3..8c1274739dd964407781971c44daa7f29568b30e 100644 (file)
@@ -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);
 
index 65aa91d4213f20f68d29c14361b0a6f55a02da81..9760bb17282e3f667ffcfa13f59070b686ccd629 100644 (file)
@@ -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;
index 522c9b71b621fda85a7c1df260f13e8eb7577976..fa78c53b1a76a4ffa6f6a7bbf1fe0562ad95206e 100644 (file)
@@ -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);
 
index 0ee0cd4a3c6f0b9868d8b7a44e316facd1b1c615..8625a72ac13209ea460539482a2704f701d72388 100644 (file)
@@ -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;
 
index bc236406d6b7c7d6d48a68323314bc0ea863a07c..74c77439a9bcc159f013ef13522460ba730568fd 100644 (file)
@@ -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;
index d0516f61a139e7bb60f68f10edffc2b4a3bce3b0..4ae86a318af263fbdb0b1d690b3bdfc336681d04 100644 (file)
@@ -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,
index c1f245d3beb227d76c3071c5f1b7e10ba75dd1bd..92e07dc5ee425efec9b38419b2098b6dbe31e835 100644 (file)
@@ -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;
index 9ad1fca74f8cd7f059ba87d282f3fa747de4b54a..92ad9951ab22151c12f28f8b7852e4d9f9723b9f 100644 (file)
@@ -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;
index 3c7ea3fda50f59f39257a70e60bfa3372e0ff52c..8ab293f4dbdda16100d92835896f9c6531d65485 100644 (file)
@@ -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);
 
index 7bd5b1209d31bb1cf38280f440c6426690b45a76..07d095f03d1bf9daa6109bbe43caaef567e0e43a 100644 (file)
@@ -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;
index 57aa4925434e9196468da4341b6f814765a3a2da..71aeaa72a8c710b21687ed178e0346f508bfc07e 100644 (file)
@@ -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;
index b53a05914fe5afbcf2c2af8d5dfa718a473e4478..c345be2869b37fea284143f717a3c8d98949d64b 100644 (file)
@@ -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 *);
index 0626f1060023071de2b309a9bb2d903a2a9e8ff4..1fe44cd1a94e9dd40e0f2a3e27c1147bf8bcf221 100644 (file)
@@ -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;
index 1462ad48f18273eac4eb2f681dd0c3d39ee54760..7c5fe441f1b951bdb83116769ed6043278af1771 100644 (file)
@@ -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);
 
index e8b279b9d8952c03836bd8d2dcf9823857b3846b..4003e2add6412624b00c5c2d076d0e9b6da96777 100644 (file)
@@ -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;
index 272ef5ce0d064d9784005224dacb84d845ae8266..314b89933e932c8157b378549eb69a6c573fa717 100644 (file)
@@ -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;
index 00422e6b9ff1a314a0dc3b9dcb1e57df29e19ff0..34614c0fbcaad916aaac01dcb86bd767a5b7de0c 100644 (file)
@@ -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;
 
index 2c189083be0b906c26134613e7f3d56dc26f1a31..fa61f669a715f39adac1364244d45c1609c51264 100644 (file)
@@ -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 */
index 67da49c21b2b1f0e06e2f1fd96cd415fee39002c..c101913bc4044793eb4d178cc0febb1a5ff49f23 100644 (file)
@@ -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;
index c3edc9dd59fc434772d8f29801983ca9e5454919..b167002b0b7b31811bafb6bf14875cecc58bd465 100644 (file)
@@ -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);
 
index 4df65ea759d65889cd3ca943ab9bbf7e8b39f4d3..79c11b820e23b3f96c9108322d3ab6102426eca6 100644 (file)
@@ -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;
index 405749b50ff4f837ded39d53f389a4c165e52697..92ab5a63bd716bb62d774bb8826af12dd47282d8 100644 (file)
@@ -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);
index c2359beb23c38035118b0b20fe395ef6b0183993..200a5db9948775f2738429c22789593f19425817 100644 (file)
@@ -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,
index 502f2336c75264ee3904451449a67975755c42fc..dcf4921d7bbcbbf833ddd5bf069ac6ef0868569c 100644 (file)
@@ -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);
index 039d67d2e25ef44238ed2c402db5b249a79591eb..f3d0f290a52299c60e21cefcb7f784238592a3d4 100644 (file)
@@ -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;
index bc0da969e3b0268a15474d985a5aa6b5a6bead76..d39371041ff82c3bf3c51dea76acd272ad868ff1 100644 (file)
@@ -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;
index 10cdd545f12bfe9eae752c69e0f4c001ecaa95ba..e4f362f26dd08373fd9330c9ed1ef2ec6a39aefe 100644 (file)
@@ -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 */
index 86501f7ad83e0a5489ff7ac360d4880fe9f76c3d..b11d90905aa8e11d71264106b0e1c129d1927fa4 100644 (file)
@@ -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;
index f1a59b1167d97676d26ff0ea78c062dd6daf27ea..1af5d877a40dd5d2943e738d07bd53a027e5eb86 100644 (file)
@@ -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);
index c722add848f802dea4015ce0657cf596807722ac..b0bcfcf5f0bceb525bad9b3f5aa6b8ec4090434b 100644 (file)
@@ -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);
 
index 2af1c77c24532daf899870873c2206e4929b2885..d3f1d39257f0dd1b59b394c5ec2ab5e035c24ef4 100644 (file)
@@ -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;
 
index e46fa2cfacd82b7f582e850f1bc2ec9cda3af5a1..9dfb6174ce532859aa9058847e75edcd8540d3fa 100644 (file)
@@ -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;
index c249f323df5a1fb19bd73888a91209f831e0f205..b9132f771e23cb10934cb4df817fdd6e40863590 100644 (file)
@@ -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;
index 5e40adb8060c56a689fb4ce0ea14ae3757e41b99..fb09e3b1cc3684e43d38ebad5021b5889fb3b064 100644 (file)
@@ -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,
index 83079020b8b62006c78df61a6315a9e60badd82b..0aff56d558d2aebaf56f42225f5e4a2c31e9ec9b 100644 (file)
@@ -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;
index 98f594d0ca907e00a52f8509aea812a28c19632f..bb457306f175b3b50024372216f3b4d4a2cb4c3e 100644 (file)
@@ -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 */
index 7ab491e99bd8852df21a5ce853cf99f813007655..4b0ff955f9d8ac820f88e49ebfe16d4a73cfae25 100644 (file)
@@ -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 */
index bff0c0683ea83e088e7243c225c089e70bc900a2..3c1b0959d849f0946ed239c8b792cc0439e1392d 100644 (file)
@@ -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;
 
index e275b5b39849ff814a86b97fabd16fbd541be8ea..a1f19b3c6e1cd7ce4aa524725988e212e4bc33e8 100644 (file)
@@ -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,
index f10bcaf04b42e71fee25f074c86a2f698d70db7b..3c7b1fc827af68ce07806a5ffb13d28bfb858252 100644 (file)
@@ -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;
index fa90e38a16057b4aeabbccb6745bd6fe3193f497..27a58c5b2376ee1e503117b62b74e4ec13825864 100644 (file)
@@ -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;
index 61cf2860fdf72ddaa229256c0bbeb8d47e289c45..be42cc996add236772bbb548f3061a36f72df59a 100644 (file)
@@ -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;
index adf0540f6526c7cb6139cdcfa74d9960a4c3f8a9..56d127eb4bb819651e91a032f287f8b851e78f8c 100644 (file)
@@ -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;
index b3d30defe1586f94dd4807aa387276603a84b709..bb9096b4535edd7bd6e16b270eedffa0dce0d2c0 100644 (file)
@@ -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;
 
index f0a03f076b84d6c322a7e3cf442ded2e4bd70f99..a4f9de0ebb3bc63ce57317e6e7471ae524185128 100644 (file)
@@ -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,
index c3dd0769674db4eed96b5a40df49a417fa64d73d..959aec0c70437abe5332ba21e327d2ebff8176fa 100644 (file)
@@ -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;
index efb14cdf72f8fc27ed45307450ec0041eeebf061..1584a2453927b00cbb107944ce63169b1a2984bd 100644 (file)
@@ -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);
index 3bf6b1d74ba5c9679618b5c0257ed66fa96d6f1b..97552e2b8f80654750dfe312eb55c19029f93d07 100644 (file)
@@ -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);
index 0b7ea0ad9d1e7135b75b04276d4d794cd7b836fc..19e3b78d65013488532530d582049de9f0db2ad9 100644 (file)
@@ -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;
index f7375745a153ca8ed4ffe6e43088c0150dd28786..69e9976de5fb33dbb5ebbedecd4b1aecc200b52c 100644 (file)
@@ -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;
 };
index 697266e2b4b50252b5064294af539eb0659feb62..2c31344739708e7af85fb7f9e8b7df4f90a4b1c7 100644 (file)
@@ -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;
index 42b013815a788fe03dd1388b8a1aa2a5b8ea4e99..5223817372d5ddb2e95424e5514659eeb5e1a886 100644 (file)
@@ -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)
 {
index 2fc30b4915355adbe56c6057eb14613d053777f9..2947dd05f7451da57e688197d35f8245b8638834 100644 (file)
@@ -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;
 
index fe15839793338fd3175aeea9406babfae9b0ea22..71286e4964b19340e02f16ecd4cf4fc174e09bc1 100644 (file)
@@ -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 */
index 3f3d67f591f2a37b344931fb97ec15b2a612570e..23f800cf88bdb0dd61d85911c39b0504d73265db 100644 (file)
@@ -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 */
 
index a0707407e5c2ced210c41eff54fc8483182d7a4b..47f2bc8b7fe22f746806adb07daf45164cbddbcd 100644 (file)
@@ -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 */
index 1ee044197a7144883fc3ef366e15d065a58e2b32..94d7b3172abc73a8318f3e637ff083b145fc22cd 100644 (file)
@@ -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;
index 890ba7d169bf816b95ae5f481dde57c29d42eff6..4e0926e29483370308394b9bf4bb0eaa1e20ce97 100644 (file)
@@ -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 */
index 91ec9d69a2d0a839b5448a204c65334f17044a96..995c14edd1f2320be9079fdf2f128a7cf2148f3a 100644 (file)
@@ -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 */);
index 6e1e066f07bc5c2a296d1591d904ab9e4e0d006e..9a135ca6b8337a88b203ef7484a9c5628b813691 100644 (file)
@@ -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;
index 29aac7f1c77d1cbd977382d9031aa1cc28735c4a..e201d506826fe4c074afb387387c84887e620488 100644 (file)
@@ -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);
 
index 5f574eb5b429a33d4e0182d0b6a18cc3cfe96182..56d5ae8c6fff7a7147b0b40f6fb2e0640304b2d6 100644 (file)
 #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);
index bc515f27ed06b468899cbb595ac5d67987777ca2..afa7896633cbefecc58b1bd2360b1081596454dd 100644 (file)
@@ -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;
index 309c18f9c2f6f395ece48363001080ad4a6be269..a32913766c60fb9a2630378f7319deeac58fb35f 100644 (file)
@@ -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;
index 85cd971509f47f8bf6024c78eb3edca1e5abb371..88094e98367b6f185652a9c00dbb1162dc834cb1 100644 (file)
@@ -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;
 
index 8b21af92ffa43448ff90c1f25b9fe26bb35d41ac..8cc339e7c6ae9a68040edaf212f62e977743dade 100644 (file)
@@ -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);
index 4894cb863269430e2829c6e684a25545cbd8a972..b987ee1a4299dfd3cf566c6154d55ed33cfa036c 100644 (file)
@@ -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 {
index 919f3c81d9cc724429e6d42a8221d605c5c8fe66..139afca7d26fdd01dcd476ded183323ac2ce9e9e 100644 (file)
@@ -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;
index 30b11aa143028253574857520bb01e9d19cd649c..dda10d1ce9a9f7b54ac862de1baec9f0680b20a9 100644 (file)
@@ -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;
 
index 24ff1bcd07ccd735407b683c29fd74451f2bb56f..3bf0e3021e286c56d8c418df59a9add634b92379 100644 (file)
@@ -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);
index 59b948b8f1f63f70b47709aa20dbdc014f486ea1..d5cdfe674aa30c92d0582fc6c7a4734d014d2a13 100644 (file)
@@ -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. */
index 9ef9b2d0f482073bc69ecd0afb7d9acb7ff39c8b..175aca308a948c05dc37c267f2e5388fc306fc3d 100644 (file)
@@ -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;
 
index aeebbd9a353a3885326ca7a13a7fae8c6bb6db5d..da714e353468838740ef9bfe42c3fdd0c3e8ac75 100644 (file)
@@ -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();
index 209b4ad86140efd0b2a27acdcf4b8721948973d9..ae089398e4bf939d49b835981ec43a7ffcddd146 100644 (file)
@@ -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 */
index 37c22c5439ce397f227d868bfa90f5362e387656..3068ba26de30f765ad16431fd16221178388d61c 100644 (file)
@@ -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 */
index 41703833892c744c2aa24ba94e4b19930b9233b5..350716ad0c60daab390857736be7b0ed008de4ea 100644 (file)
@@ -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 */
index b841fea25ef3040dbdd3fdce91aeb5ac5efb6db1..8b1c222ad3e618ec12598958d43aec0df7bc872b 100644 (file)
@@ -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;
index 187b8091dfde7c6a12dc1683749a38666c0c7193..b274c3d3a5ca520a4602fab8e3a5616557b7939a 100644 (file)
@@ -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;
index 0cee1e863c0552276a6cc041f2c98de94577d94f..59da82b2f45ed8bb78f00526d8a3ff690212c265 100644 (file)
@@ -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);
 
index 8532da7c2d9c1342e4870cbd74dcfa099963a798..f4a22930bf359aee5f4cc2af2d6f675d989fb377 100644 (file)
@@ -49,7 +49,7 @@ void func3(void)
        func2(6, buf);
 }
 
-static void threadfunc(struct thread *thread)
+static void threadfunc(struct event *thread)
 {
        func3();
 }
index 897e004b4009df5271cdf5fd6e55f77ca5ab8b28..b72bf6b1f0e4818a51c2ac0dec7090747e0e3ce5 100644 (file)
@@ -36,7 +36,7 @@ struct frr_signal_t sigs[] = {{
                              }};
 
 struct thread_master *master;
-struct thread t;
+struct event t;
 
 int main(void)
 {
index fa197cd1c9a4822f7effff5f43120d4ea2ccc367..b2e3d8de695b170dc8e2ed18a26c68ae4ef76391 100644 (file)
@@ -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);
index 5af0604d1b3503ac4d2587fb46ea5b5459700011..d4cd6538024c880d68ed0891071d9bab6c6d0c81 100644 (file)
@@ -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;
 
index 59a596e1c895a08911fa369da36b927096a1491c..836819c5464aeb91acf6c95f22dae2defd67bc26 100644 (file)
@@ -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);
index d40b37b92775d4f1a1ebaf66ac48f7ba0e312ea2..ebd8db736b1e2ca346f4bdd41b51f1e48d8cb3c5 100644 (file)
@@ -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 */
index 1d934f616b25eacc41e67b355a8a12432c8a3246..19d53c1a191c90adbf383298ce0ceec5a19dd3b5 100644 (file)
@@ -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);
 
index 5cdba8677db571a48db52db007971a36c500d05f..7670190330f2846f0b171255997ed8d84e580e1c 100644 (file)
@@ -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;
 };
 
 /*
index 50970f26c91ba609da906028e3759ab9c0cce0b3..dd737dd0a50a1e9eff5deb12c5163ec14305353c 100644 (file)
@@ -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 {
index 25b667252e51218dbc2df44974c0f591df524bae..8019555493acd89c53fe640b60304e86baf13a29 100644 (file)
@@ -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);
 
index eb32cc96674014464a64fd38596a3d13ff69c583..4ded379efbbc15cb9a20455fa195a7da72cdf93f 100644 (file)
@@ -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);
 }
index 18aed7b376a81a3b24a23969c97a79b7b42fc860..697c448b8895d9870c1c0d80f713954e2e88a2d4 100644 (file)
@@ -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);
index 1ba5e972f8d7606b211ef548548e9cdf6276e603..fdc538bf0fe519d588f1546e6b2710662baea8d2 100644 (file)
@@ -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;
index c8ae906c916b98bf8f4c33c9b4019bab075f9c8e..4c6ebaa11dd784731ae082f0c5313a04b7adc431 100644 (file)
@@ -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
index 9b97bb93fa41e16f7b97c3b5426e5d6bff8989c4..4330734992ce8e054eb42fea5e1a7e2695c22667 100644 (file)
@@ -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);
 
index 8940970208b6f597cd26d223058aa8307bc17a85..4d9aad5cee39e7e4d6834334024b04353a0bf39d 100644 (file)
@@ -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);
index 7903f14e1a71088059fe48e62cd9e17036f5b305..aee59a78fc6ca6e133ded3fe5825adc1be1d11b8 100644 (file)
@@ -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;
index fdf4b850d3c42fe104eacf7e83c4b68b7a44ca28..a779533e34c6f07a2c2a4814d5f6852010d7fe18 100644 (file)
@@ -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;
index 04f484cd9a5206a0dde0c185387e76210c2ae6e7..8f00297b66e2791720da3554827344dd61376b57 100644 (file)
@@ -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;
index 49b928d09cb6b430aaeed8879aa6575c16045d7e..25480f41d4a36b227d690dc0e98259450a5a5fb6 100644 (file)
@@ -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");
 
index 70968d3900c8e5c5cc9a4e7534682e02b3b4a375..0e897881e440d4cb0c7774b967a0c187f4271ef7 100644 (file)
@@ -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);
index 7f9a8ed00cc4de33ca15719d4194753101bf441e..c1c4e1f2a6072166d9de2737cab8ce149429d48e 100644 (file)
@@ -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;
index 2338efe0bd0983841a54eb3dbf7417cb10be3a98..1ec376a10626ffa28b7c064a9519b0a0d08c2c59 100644 (file)
@@ -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);
index af1dd6b5fd87c9c4c8105415a8413360ee1cc667..4b38a4b8592af07418027aeefd02aae86a734b70 100644 (file)
@@ -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;
index a2d310a10b2c3bf42a46d22abb544ce736eb8159..2c55a54c70996b205353aa7c4bd47816e109d552 100644 (file)
@@ -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;
index befb1c398d43613140e638edf6d0361495e8fd56..ba612f76969071f9df3d625febe82c4784088148 100644 (file)
@@ -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
index 334dde3b101230d4243435e8e8c95ed205d8c8fd..85a96fe4f587734a3e7cba9bfd0c0db38f2b0e6a 100644 (file)
@@ -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");
index 89a917628d2e4d30646a0c250fcad40b1d4f8075..6dda30a57fefb033b4a8f91558f35bcc972f2e7d 100644 (file)
@@ -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;
index acd60aa08f619ed97ccfed87d2114b135381f141..b27ddb5e6104b364135850d5c47653cf53d0eaeb 100644 (file)
@@ -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;
index 18ef8546de31d5afd4ee560aade2fec9d802d124..67fef799c2abc91ab78b771b8b4b7e8261354d28 100644 (file)
@@ -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;
 };
 
 /*
index f7de5eb0c60259ee1cfab74cd5a0fe378abc7757..0795d122632c114b1c106ce64e01b9bbc5d9cc97 100644 (file)
@@ -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;
 
index c9881e51dc3917184077176c6563e04740c46927..8aee7f0d732ce1336267764185eb6a699c7c5255 100644 (file)
@@ -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;
index b4a0c575a25e3956f1d97f548e788be3da167203..ad128f8af64cf762b0b3889829938a32d77808ab 100644 (file)
@@ -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");
index d9189206fa325e6af24f22e4bd57bc6f51856771..ba66dc464a974696b6c6cc42bcda12f6228a2bda 100644 (file)
@@ -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};
 
index 468acbdfe417c91a051ee28144b438f8eb9e8dba..205c10ce256bee4a138a5766e6522087810001af 100644 (file)
 #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;
index 654cf50d49c267ff3c914a5878beeb77a89bb7f4..f42c7a42d2e445569e519430729cbb206e9a9150 100644 (file)
@@ -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);
 
index 5830952d5acaef7755091e14769ac82d0949525b..b178007b4ef1d4e60288ab91b5c083e5f1f69ccd 100644 (file)
@@ -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.
index 5e8764854ed33671d483890ceb1fd65cf55b4357..e759d522fa2de5e11a8a1f580143be24ee7582e0 100644 (file)
@@ -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;
index 7cfb3294eb893e513e43e6a49bbb02711b14b898..491ea45d9808f0893381887ebb528413008fd06f 100644 (file)
@@ -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;
index a8f4953d5a1e7949501c02998e396d4c9632e6aa..301f1c3f748b9108ed82fd9a7ee338ef430c44a3 100644 (file)
@@ -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;
index 9cea96555b650dc94575baf94317efb2c6285272..1b2f7a02d41589008b1683a09ff752b54b32dbc7 100644 (file)
@@ -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);
 
index a3f7ba62808163089f3dcfedd64cffdc072a2481..243ce309591b9ff747b94afccdf4488f01fd6714 100644 (file)
@@ -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);
 
index d939cc07eaa941fdcce4570ed1961d70cbd6f60a..fd94d5e5edfe920fe840bbc4680b2e0dc0f09bf4 100644 (file)
@@ -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);
index 5e9eda168ecf3c69bc1f8e2e9665db5e14177fbe..082afbe0f75a83ee01d8dc12e84269ad014f6869 100644 (file)
@@ -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;
index c5bccd05a6c3952d2cc1b3a0f297379a32572f3b..8558d0f963cd3328db48c4ac75e4e46830634d21 100644 (file)
@@ -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");
index 3112fcab4647ecf03863e59ddd2e0add7c5ccb72..028a41c314b4250cc678a29644602db85e5195e7 100644 (file)
@@ -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
index 3563068a66b1b6465587e8228288cf6eedbdfd4c..ba05e860a918d25b317b65dce20e2d314ef03ce4 100644 (file)
@@ -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;
index 0faea9dd7300a613f0f31123fd20d4afde6f4890..fc1fd0ec93f63f924759cf5f6bce1d9d14739494 100644 (file)
@@ -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.