diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-12-25 10:26:52 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-03-24 08:32:17 -0400 |
| commit | e16d030c65ca97b1ba68b93ada93b1d4edde59d3 (patch) | |
| tree | e3a57a2e2887a899cad71c0640047b2b2409b5fa /ospf6d | |
| parent | 70d4d90c82f3fb4eb552438422afb79e29a4dca0 (diff) | |
*: Convert THREAD_XXX macros to EVENT_XXX macros
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospf6d')
| -rw-r--r-- | ospf6d/ospf6_area.c | 4 | ||||
| -rw-r--r-- | ospf6d/ospf6_asbr.c | 12 | ||||
| -rw-r--r-- | ospf6d/ospf6_bfd.c | 2 | ||||
| -rw-r--r-- | ospf6d/ospf6_flood.c | 12 | ||||
| -rw-r--r-- | ospf6d/ospf6_gr.c | 4 | ||||
| -rw-r--r-- | ospf6d/ospf6_gr_helper.c | 6 | ||||
| -rw-r--r-- | ospf6d/ospf6_interface.c | 58 | ||||
| -rw-r--r-- | ospf6d/ospf6_intra.c | 10 | ||||
| -rw-r--r-- | ospf6d/ospf6_intra.h | 6 | ||||
| -rw-r--r-- | ospf6d/ospf6_lsa.c | 12 | ||||
| -rw-r--r-- | ospf6d/ospf6_lsdb.c | 2 | ||||
| -rw-r--r-- | ospf6d/ospf6_message.c | 34 | ||||
| -rw-r--r-- | ospf6d/ospf6_neighbor.c | 68 | ||||
| -rw-r--r-- | ospf6d/ospf6_nssa.c | 6 | ||||
| -rw-r--r-- | ospf6d/ospf6_spf.c | 6 | ||||
| -rw-r--r-- | ospf6d/ospf6_top.c | 20 |
16 files changed, 131 insertions, 131 deletions
diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index e7fefb72a7..0a4d3e957a 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -421,8 +421,8 @@ void ospf6_area_disable(struct ospf6_area *oa) ospf6_spf_table_finish(oa->spf_table); ospf6_route_remove_all(oa->route_table); - THREAD_OFF(oa->thread_router_lsa); - THREAD_OFF(oa->thread_intra_prefix_lsa); + EVENT_OFF(oa->thread_router_lsa); + EVENT_OFF(oa->thread_intra_prefix_lsa); } diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 81b393f20d..57b5fafa91 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -186,7 +186,7 @@ void ospf6_orig_as_external_lsa(struct event *thread) struct ospf6_lsa *lsa; uint32_t type, adv_router; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); if (oi->state == OSPF6_INTERFACE_DOWN) return; @@ -1067,7 +1067,7 @@ static void ospf6_asbr_routemap_unset(struct ospf6_redist *red) static void ospf6_asbr_routemap_update_timer(struct event *thread) { - struct ospf6 *ospf6 = THREAD_ARG(thread); + struct ospf6 *ospf6 = EVENT_ARG(thread); struct ospf6_redist *red; int type; @@ -3022,7 +3022,7 @@ static void ospf6_aggr_handle_external_info(void *data) if (IS_OSPF6_DEBUG_AGGR) zlog_debug("%s: LSA found, refresh it", __func__); - THREAD_OFF(lsa->refresh); + EVENT_OFF(lsa->refresh); event_add_event(master, ospf6_lsa_refresh, lsa, 0, &lsa->refresh); return; @@ -3225,7 +3225,7 @@ static void ospf6_handle_exnl_rt_after_aggr_del(struct ospf6 *ospf6, lsa = ospf6_find_external_lsa(ospf6, &rt->prefix); if (lsa) { - THREAD_OFF(lsa->refresh); + EVENT_OFF(lsa->refresh); event_add_event(master, ospf6_lsa_refresh, lsa, 0, &lsa->refresh); } else { @@ -3333,7 +3333,7 @@ ospf6_handle_external_aggr_add(struct ospf6 *ospf6) static void ospf6_asbr_summary_process(struct event *thread) { - struct ospf6 *ospf6 = THREAD_ARG(thread); + struct ospf6 *ospf6 = EVENT_ARG(thread); int operation = 0; operation = ospf6->aggr_action; @@ -3376,7 +3376,7 @@ ospf6_start_asbr_summary_delay_timer(struct ospf6 *ospf6, if (IS_OSPF6_DEBUG_AGGR) zlog_debug("%s, Restarting Aggregator delay timer.", __func__); - THREAD_OFF(ospf6->t_external_aggr); + EVENT_OFF(ospf6->t_external_aggr); } } diff --git a/ospf6d/ospf6_bfd.c b/ospf6d/ospf6_bfd.c index bbe3fcd038..1f3c4be4d8 100644 --- a/ospf6d/ospf6_bfd.c +++ b/ospf6d/ospf6_bfd.c @@ -105,7 +105,7 @@ static void ospf6_bfd_callback(struct bfd_session_params *bsp, if (bss->state == BFD_STATUS_DOWN && bss->previous_state == BFD_STATUS_UP) { - THREAD_OFF(on->inactivity_timer); + EVENT_OFF(on->inactivity_timer); event_add_event(master, inactivity_timer, on, 0, NULL); } } diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index ddf775d72d..9e482e7512 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -103,7 +103,7 @@ void ospf6_lsa_originate(struct ospf6 *ospf6, struct ospf6_lsa *lsa) lsdb_self = ospf6_get_scoped_lsdb_self(lsa); ospf6_lsdb_add(ospf6_lsa_copy(lsa), lsdb_self); - THREAD_OFF(lsa->refresh); + EVENT_OFF(lsa->refresh); event_add_timer(master, ospf6_lsa_refresh, lsa, OSPF_LS_REFRESH_TIME, &lsa->refresh); @@ -168,8 +168,8 @@ void ospf6_lsa_purge(struct ospf6_lsa *lsa) self = ospf6_lsdb_lookup(lsa->header->type, lsa->header->id, lsa->header->adv_router, lsdb_self); if (self) { - THREAD_OFF(self->expire); - THREAD_OFF(self->refresh); + EVENT_OFF(self->expire); + EVENT_OFF(self->refresh); ospf6_lsdb_remove(self, lsdb_self); } @@ -250,8 +250,8 @@ void ospf6_install_lsa(struct ospf6_lsa *lsa) lsa->name); lsa->external_lsa_id = old->external_lsa_id; } - THREAD_OFF(old->expire); - THREAD_OFF(old->refresh); + EVENT_OFF(old->expire); + EVENT_OFF(old->refresh); ospf6_flood_clear(old); } @@ -525,7 +525,7 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa, } else { /* reschedule retransmissions to all neighbors */ for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on)) { - THREAD_OFF(on->thread_send_lsupdate); + EVENT_OFF(on->thread_send_lsupdate); event_add_event(master, ospf6_lsupdate_send_neighbor, on, 0, &on->thread_send_lsupdate); } diff --git a/ospf6d/ospf6_gr.c b/ospf6d/ospf6_gr.c index c79f3de9c3..976eb529d7 100644 --- a/ospf6d/ospf6_gr.c +++ b/ospf6d/ospf6_gr.c @@ -134,7 +134,7 @@ static void ospf6_gr_restart_exit(struct ospf6 *ospf6, const char *reason) ospf6->gr_info.restart_in_progress = false; ospf6->gr_info.finishing_restart = true; - THREAD_OFF(ospf6->gr_info.t_grace_period); + EVENT_OFF(ospf6->gr_info.t_grace_period); /* Record in non-volatile memory that the restart is complete. */ ospf6_gr_nvm_delete(ospf6); @@ -461,7 +461,7 @@ static bool ospf6_gr_check_adjs(struct ospf6 *ospf6) /* Handling of grace period expiry. */ static void ospf6_gr_grace_period_expired(struct event *thread) { - struct ospf6 *ospf6 = THREAD_ARG(thread); + struct ospf6 *ospf6 = EVENT_ARG(thread); ospf6_gr_restart_exit(ospf6, "grace period has expired"); } diff --git a/ospf6d/ospf6_gr_helper.c b/ospf6d/ospf6_gr_helper.c index 89f6b282b1..d313510cfa 100644 --- a/ospf6d/ospf6_gr_helper.c +++ b/ospf6d/ospf6_gr_helper.c @@ -197,7 +197,7 @@ static int ospf6_extract_grace_lsa_fields(struct ospf6_lsa *lsa, */ static void ospf6_handle_grace_timer_expiry(struct event *thread) { - struct ospf6_neighbor *nbr = THREAD_ARG(thread); + struct ospf6_neighbor *nbr = EVENT_ARG(thread); ospf6_gr_helper_exit(nbr, OSPF6_GR_HELPER_GRACE_TIMEOUT); } @@ -382,7 +382,7 @@ int ospf6_process_grace_lsa(struct ospf6 *ospf6, struct ospf6_lsa *lsa, } if (OSPF6_GR_IS_ACTIVE_HELPER(restarter)) { - THREAD_OFF(restarter->gr_helper_info.t_grace_timer); + EVENT_OFF(restarter->gr_helper_info.t_grace_timer); if (ospf6->ospf6_helper_cfg.active_restarter_cnt > 0) ospf6->ospf6_helper_cfg.active_restarter_cnt--; @@ -470,7 +470,7 @@ void ospf6_gr_helper_exit(struct ospf6_neighbor *nbr, * expiry, stop the grace timer. */ if (reason != OSPF6_GR_HELPER_GRACE_TIMEOUT) - THREAD_OFF(nbr->gr_helper_info.t_grace_timer); + EVENT_OFF(nbr->gr_helper_info.t_grace_timer); if (ospf6->ospf6_helper_cfg.active_restarter_cnt <= 0) { zlog_err( diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index f195b17103..617a4a2354 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -260,11 +260,11 @@ void ospf6_interface_delete(struct ospf6_interface *oi) list_delete(&oi->neighbor_list); - THREAD_OFF(oi->thread_send_hello); - THREAD_OFF(oi->thread_send_lsupdate); - THREAD_OFF(oi->thread_send_lsack); - THREAD_OFF(oi->thread_sso); - THREAD_OFF(oi->thread_wait_timer); + EVENT_OFF(oi->thread_send_hello); + EVENT_OFF(oi->thread_send_lsupdate); + EVENT_OFF(oi->thread_send_lsack); + EVENT_OFF(oi->thread_sso); + EVENT_OFF(oi->thread_wait_timer); ospf6_lsdb_remove_all(oi->lsdb); ospf6_lsdb_remove_all(oi->lsupdate_list); @@ -314,16 +314,16 @@ void ospf6_interface_disable(struct ospf6_interface *oi) ospf6_lsdb_remove_all(oi->lsupdate_list); ospf6_lsdb_remove_all(oi->lsack_list); - THREAD_OFF(oi->thread_send_hello); - THREAD_OFF(oi->thread_send_lsupdate); - THREAD_OFF(oi->thread_send_lsack); - THREAD_OFF(oi->thread_sso); + EVENT_OFF(oi->thread_send_hello); + EVENT_OFF(oi->thread_send_lsupdate); + EVENT_OFF(oi->thread_send_lsack); + EVENT_OFF(oi->thread_sso); - THREAD_OFF(oi->thread_network_lsa); - THREAD_OFF(oi->thread_link_lsa); - THREAD_OFF(oi->thread_intra_prefix_lsa); - THREAD_OFF(oi->thread_as_extern_lsa); - THREAD_OFF(oi->thread_wait_timer); + EVENT_OFF(oi->thread_network_lsa); + EVENT_OFF(oi->thread_link_lsa); + EVENT_OFF(oi->thread_intra_prefix_lsa); + EVENT_OFF(oi->thread_as_extern_lsa); + EVENT_OFF(oi->thread_wait_timer); } static struct in6_addr * @@ -725,7 +725,7 @@ void interface_up(struct event *thread) struct ospf6_interface *oi; struct ospf6 *ospf6; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); assert(oi && oi->interface); if (!oi->type_cfg) @@ -837,7 +837,7 @@ void wait_timer(struct event *thread) { struct ospf6_interface *oi; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); assert(oi && oi->interface); if (IS_OSPF6_DEBUG_INTERFACE) @@ -852,7 +852,7 @@ void backup_seen(struct event *thread) { struct ospf6_interface *oi; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); assert(oi && oi->interface); if (IS_OSPF6_DEBUG_INTERFACE) @@ -867,7 +867,7 @@ void neighbor_change(struct event *thread) { struct ospf6_interface *oi; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); assert(oi && oi->interface); if (IS_OSPF6_DEBUG_INTERFACE) @@ -887,7 +887,7 @@ void interface_down(struct event *thread) struct ospf6_neighbor *on; struct ospf6 *ospf6; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); assert(oi && oi->interface); if (IS_OSPF6_DEBUG_INTERFACE) @@ -895,10 +895,10 @@ void interface_down(struct event *thread) oi->interface->name); /* Stop Hellos */ - THREAD_OFF(oi->thread_send_hello); + EVENT_OFF(oi->thread_send_hello); /* Stop trying to set socket options. */ - THREAD_OFF(oi->thread_sso); + EVENT_OFF(oi->thread_sso); /* Cease the HELPER role for all the neighbours * of this interface. @@ -1876,7 +1876,7 @@ DEFUN (ipv6_ospf6_ifmtu, /* re-establish adjacencies */ for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on)) { - THREAD_OFF(on->inactivity_timer); + EVENT_OFF(on->inactivity_timer); event_add_event(master, inactivity_timer, on, 0, NULL); } @@ -1922,7 +1922,7 @@ DEFUN (no_ipv6_ospf6_ifmtu, /* re-establish adjacencies */ for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on)) { - THREAD_OFF(on->inactivity_timer); + EVENT_OFF(on->inactivity_timer); event_add_event(master, inactivity_timer, on, 0, NULL); } @@ -2106,7 +2106,7 @@ DEFUN (ipv6_ospf6_hellointerval, * If the thread is scheduled, send the new hello now. */ if (event_is_scheduled(oi->thread_send_hello)) { - THREAD_OFF(oi->thread_send_hello); + EVENT_OFF(oi->thread_send_hello); event_add_timer(master, ospf6_hello_send, oi, 0, &oi->thread_send_hello); @@ -2322,11 +2322,11 @@ DEFUN (ipv6_ospf6_passive, assert(oi); SET_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE); - THREAD_OFF(oi->thread_send_hello); - THREAD_OFF(oi->thread_sso); + EVENT_OFF(oi->thread_send_hello); + EVENT_OFF(oi->thread_sso); for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on)) { - THREAD_OFF(on->inactivity_timer); + EVENT_OFF(on->inactivity_timer); event_add_event(master, inactivity_timer, on, 0, NULL); } @@ -2352,8 +2352,8 @@ DEFUN (no_ipv6_ospf6_passive, assert(oi); UNSET_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE); - THREAD_OFF(oi->thread_send_hello); - THREAD_OFF(oi->thread_sso); + EVENT_OFF(oi->thread_send_hello); + EVENT_OFF(oi->thread_sso); /* don't send hellos over loopback interface */ if (!if_is_loopback(oi->interface)) diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 821ace89e9..a8c12f8a54 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -228,7 +228,7 @@ void ospf6_router_lsa_originate(struct event *thread) uint32_t router; int count; - oa = (struct ospf6_area *)THREAD_ARG(thread); + oa = (struct ospf6_area *)EVENT_ARG(thread); if (oa->ospf6->gr_info.restart_in_progress) { if (IS_DEBUG_OSPF6_GR) @@ -510,7 +510,7 @@ void ospf6_network_lsa_originate(struct event *thread) struct listnode *i; uint16_t type; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); /* The interface must be enabled until here. A Network-LSA of a disabled interface (but was once enabled) should be flushed @@ -758,7 +758,7 @@ void ospf6_link_lsa_originate(struct event *thread) struct ospf6_route *route; struct ospf6_prefix *op; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); assert(oi->area); @@ -1001,7 +1001,7 @@ void ospf6_intra_prefix_lsa_originate_stub(struct event *thread) struct ospf6_route_table *route_advertise; int ls_id = 0; - oa = (struct ospf6_area *)THREAD_ARG(thread); + oa = (struct ospf6_area *)EVENT_ARG(thread); if (oa->ospf6->gr_info.restart_in_progress) { if (IS_DEBUG_OSPF6_GR) @@ -1237,7 +1237,7 @@ void ospf6_intra_prefix_lsa_originate_transit(struct event *thread) char *start, *end, *current; uint16_t type; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); assert(oi->area); diff --git a/ospf6d/ospf6_intra.h b/ospf6d/ospf6_intra.h index 62e877eb59..0f286f0ab1 100644 --- a/ospf6d/ospf6_intra.h +++ b/ospf6d/ospf6_intra.h @@ -186,7 +186,7 @@ struct ospf6_intra_prefix_lsa { #define OSPF6_NETWORK_LSA_EXECUTE(oi) \ do { \ - THREAD_OFF((oi)->thread_network_lsa); \ + EVENT_OFF((oi)->thread_network_lsa); \ event_execute(master, ospf6_network_lsa_originate, oi, 0); \ } while (0) @@ -199,7 +199,7 @@ struct ospf6_intra_prefix_lsa { #define OSPF6_INTRA_PREFIX_LSA_EXECUTE_TRANSIT(oi) \ do { \ - THREAD_OFF((oi)->thread_intra_prefix_lsa); \ + EVENT_OFF((oi)->thread_intra_prefix_lsa); \ event_execute(master, \ ospf6_intra_prefix_lsa_originate_transit, oi, \ 0); \ @@ -207,7 +207,7 @@ struct ospf6_intra_prefix_lsa { #define OSPF6_AS_EXTERN_LSA_EXECUTE(oi) \ do { \ - THREAD_OFF((oi)->thread_as_extern_lsa); \ + EVENT_OFF((oi)->thread_as_extern_lsa); \ event_execute(master, ospf6_orig_as_external_lsa, oi, 0); \ } while (0) diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index be0cc34424..708aaec894 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -302,8 +302,8 @@ void ospf6_lsa_premature_aging(struct ospf6_lsa *lsa) if (IS_OSPF6_DEBUG_LSA_TYPE(lsa->header->type)) zlog_debug("LSA: Premature aging: %s", lsa->name); - THREAD_OFF(lsa->expire); - THREAD_OFF(lsa->refresh); + EVENT_OFF(lsa->expire); + EVENT_OFF(lsa->refresh); /* * We clear the LSA from the neighbor retx lists now because it @@ -760,8 +760,8 @@ void ospf6_lsa_delete(struct ospf6_lsa *lsa) assert(lsa->lock == 0); /* cancel threads */ - THREAD_OFF(lsa->expire); - THREAD_OFF(lsa->refresh); + EVENT_OFF(lsa->expire); + EVENT_OFF(lsa->refresh); /* do free */ XFREE(MTYPE_OSPF6_LSA_HEADER, lsa->header); @@ -817,7 +817,7 @@ void ospf6_lsa_expire(struct event *thread) struct ospf6_lsa *lsa; struct ospf6 *ospf6; - lsa = (struct ospf6_lsa *)THREAD_ARG(thread); + lsa = (struct ospf6_lsa *)EVENT_ARG(thread); assert(lsa && lsa->header); assert(OSPF6_LSA_IS_MAXAGE(lsa)); @@ -850,7 +850,7 @@ void ospf6_lsa_refresh(struct event *thread) struct ospf6_lsa *old, *self, *new; struct ospf6_lsdb *lsdb_self; - old = (struct ospf6_lsa *)THREAD_ARG(thread); + old = (struct ospf6_lsa *)EVENT_ARG(thread); assert(old && old->header); old->refresh = (struct event *)NULL; diff --git a/ospf6d/ospf6_lsdb.c b/ospf6d/ospf6_lsdb.c index 817949f019..7925a8b2f4 100644 --- a/ospf6d/ospf6_lsdb.c +++ b/ospf6d/ospf6_lsdb.c @@ -395,7 +395,7 @@ int ospf6_lsdb_maxage_remover(struct ospf6_lsdb *lsdb) htonl(OSPF_MAX_SEQUENCE_NUMBER + 1); ospf6_lsa_checksum(lsa->header); - THREAD_OFF(lsa->refresh); + EVENT_OFF(lsa->refresh); event_execute(master, ospf6_lsa_refresh, lsa, 0); } else { zlog_debug("calling ospf6_lsdb_remove %s", lsa->name); diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 99c33faccf..69ac2f3b6d 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -790,7 +790,7 @@ static void ospf6_dbdesc_recv_master(struct ospf6_header *oh, event_add_event(master, ospf6_lsreq_send, on, 0, &on->thread_send_lsreq); - THREAD_OFF(on->thread_send_dbdesc); + EVENT_OFF(on->thread_send_dbdesc); /* More bit check */ if (!CHECK_FLAG(dbdesc->bits, OSPF6_DBDESC_MBIT) @@ -875,7 +875,7 @@ static void ospf6_dbdesc_recv_slave(struct ospf6_header *oh, if (IS_OSPF6_DEBUG_MESSAGE(oh->type, RECV_HDR)) zlog_debug( "Duplicated dbdesc causes retransmit"); - THREAD_OFF(on->thread_send_dbdesc); + EVENT_OFF(on->thread_send_dbdesc); event_add_event(master, ospf6_dbdesc_send, on, 0, &on->thread_send_dbdesc); return; @@ -928,7 +928,7 @@ static void ospf6_dbdesc_recv_slave(struct ospf6_header *oh, if (IS_OSPF6_DEBUG_MESSAGE(oh->type, RECV_HDR)) zlog_debug( "Duplicated dbdesc causes retransmit"); - THREAD_OFF(on->thread_send_dbdesc); + EVENT_OFF(on->thread_send_dbdesc); event_add_event(master, ospf6_dbdesc_send, on, 0, &on->thread_send_dbdesc); return; @@ -1002,7 +1002,7 @@ static void ospf6_dbdesc_recv_slave(struct ospf6_header *oh, event_add_event(master, ospf6_lsreq_send, on, 0, &on->thread_send_lsreq); - THREAD_OFF(on->thread_send_dbdesc); + EVENT_OFF(on->thread_send_dbdesc); event_add_event(master, ospf6_dbdesc_send_newone, on, 0, &on->thread_send_dbdesc); @@ -1136,7 +1136,7 @@ static void ospf6_lsreq_recv(struct in6_addr *src, struct in6_addr *dst, assert(p == OSPF6_MESSAGE_END(oh)); /* schedule send lsupdate */ - THREAD_OFF(on->thread_send_lsupdate); + EVENT_OFF(on->thread_send_lsupdate); event_add_event(master, ospf6_lsupdate_send_neighbor, on, 0, &on->thread_send_lsupdate); } @@ -1914,8 +1914,8 @@ void ospf6_receive(struct event *thread) int count = 0; /* add next read thread */ - ospf6 = THREAD_ARG(thread); - sockfd = THREAD_FD(thread); + ospf6 = EVENT_ARG(thread); + sockfd = EVENT_FD(thread); event_add_read(master, ospf6_receive, ospf6, ospf6->fd, &ospf6->t_ospf6_receive); @@ -2084,7 +2084,7 @@ static uint16_t ospf6_make_hello(struct ospf6_interface *oi, struct stream *s) static void ospf6_write(struct event *thread) { - struct ospf6 *ospf6 = THREAD_ARG(thread); + struct ospf6 *ospf6 = EVENT_ARG(thread); struct ospf6_interface *oi; struct ospf6_header *oh; struct ospf6_packet *op; @@ -2242,7 +2242,7 @@ void ospf6_hello_send(struct event *thread) struct ospf6_packet *op; uint16_t length = OSPF6_HEADER_SIZE; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); if (oi->state <= OSPF6_INTERFACE_DOWN) { if (IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_HELLO, SEND_HDR)) @@ -2339,7 +2339,7 @@ void ospf6_dbdesc_send(struct event *thread) uint16_t length = OSPF6_HEADER_SIZE; struct ospf6_packet *op; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); if (on->state < OSPF6_NEIGHBOR_EXSTART) { if (IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_DBDESC, SEND)) @@ -2382,7 +2382,7 @@ void ospf6_dbdesc_send_newone(struct event *thread) struct ospf6_lsa *lsa, *lsanext; unsigned int size = 0; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); ospf6_lsdb_remove_all(on->dbdesc_list); /* move LSAs from summary_list to dbdesc_list (within neighbor @@ -2504,7 +2504,7 @@ void ospf6_lsreq_send(struct event *thread) struct ospf6_packet *op; uint16_t length = OSPF6_HEADER_SIZE; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); /* LSReq will be sent only in ExStart or Loading */ if (on->state != OSPF6_NEIGHBOR_EXCHANGE @@ -2683,7 +2683,7 @@ void ospf6_lsupdate_send_neighbor(struct event *thread) uint16_t length = OSPF6_HEADER_SIZE; int lsa_cnt = 0; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); if (IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_LSUPDATE, SEND_HDR)) zlog_debug("LSUpdate to neighbor %s", on->name); @@ -2818,7 +2818,7 @@ void ospf6_lsupdate_send_interface(struct event *thread) uint16_t length = OSPF6_HEADER_SIZE; int lsa_cnt = 0; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); if (oi->state <= OSPF6_INTERFACE_WAITING) { if (IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_LSUPDATE, @@ -2858,7 +2858,7 @@ void ospf6_lsack_send_neighbor(struct event *thread) struct ospf6_packet *op; uint16_t length = OSPF6_HEADER_SIZE; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); if (on->state < OSPF6_NEIGHBOR_EXCHANGE) { if (IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_LSACK, SEND_HDR)) @@ -2909,7 +2909,7 @@ static uint16_t ospf6_make_lsack_interface(struct ospf6_interface *oi, > ospf6_packet_max(oi)) { /* if we run out of packet size/space here, better to try again soon. */ - THREAD_OFF(oi->thread_send_lsack); + EVENT_OFF(oi->thread_send_lsack); event_add_event(master, ospf6_lsack_send_interface, oi, 0, &oi->thread_send_lsack); @@ -2934,7 +2934,7 @@ void ospf6_lsack_send_interface(struct event *thread) struct ospf6_packet *op; uint16_t length = OSPF6_HEADER_SIZE; - oi = (struct ospf6_interface *)THREAD_ARG(thread); + oi = (struct ospf6_interface *)EVENT_ARG(thread); if (oi->state <= OSPF6_INTERFACE_WAITING) { if (IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_LSACK, SEND_HDR)) diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 5af69738c0..00d3a85308 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -163,18 +163,18 @@ void ospf6_neighbor_delete(struct ospf6_neighbor *on) ospf6_lsdb_delete(on->lsupdate_list); ospf6_lsdb_delete(on->lsack_list); - THREAD_OFF(on->inactivity_timer); + EVENT_OFF(on->inactivity_timer); - THREAD_OFF(on->last_dbdesc_release_timer); + EVENT_OFF(on->last_dbdesc_release_timer); - THREAD_OFF(on->thread_send_dbdesc); - THREAD_OFF(on->thread_send_lsreq); - THREAD_OFF(on->thread_send_lsupdate); - THREAD_OFF(on->thread_send_lsack); - THREAD_OFF(on->thread_exchange_done); - THREAD_OFF(on->thread_adj_ok); + EVENT_OFF(on->thread_send_dbdesc); + EVENT_OFF(on->thread_send_lsreq); + EVENT_OFF(on->thread_send_lsupdate); + EVENT_OFF(on->thread_send_lsack); + EVENT_OFF(on->thread_exchange_done); + EVENT_OFF(on->thread_adj_ok); - THREAD_OFF(on->gr_helper_info.t_grace_timer); + EVENT_OFF(on->gr_helper_info.t_grace_timer); bfd_sess_free(&on->bfd_session); XFREE(MTYPE_OSPF6_NEIGHBOR, on); @@ -276,14 +276,14 @@ void hello_received(struct event *thread) { struct ospf6_neighbor *on; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); assert(on); if (IS_OSPF6_DEBUG_NEIGHBOR(EVENT)) zlog_debug("Neighbor Event %s: *HelloReceived*", on->name); /* reset Inactivity Timer */ - THREAD_OFF(on->inactivity_timer); + EVENT_OFF(on->inactivity_timer); event_add_timer(master, inactivity_timer, on, on->ospf6_if->dead_interval, &on->inactivity_timer); @@ -296,7 +296,7 @@ void twoway_received(struct event *thread) { struct ospf6_neighbor *on; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); assert(on); if (on->state > OSPF6_NEIGHBOR_INIT) @@ -319,7 +319,7 @@ void twoway_received(struct event *thread) SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_MBIT); SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_IBIT); - THREAD_OFF(on->thread_send_dbdesc); + EVENT_OFF(on->thread_send_dbdesc); event_add_event(master, ospf6_dbdesc_send, on, 0, &on->thread_send_dbdesc); } @@ -329,7 +329,7 @@ void negotiation_done(struct event *thread) struct ospf6_neighbor *on; struct ospf6_lsa *lsa, *lsanext; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); assert(on); if (on->state != OSPF6_NEIGHBOR_EXSTART) @@ -375,7 +375,7 @@ void negotiation_done(struct event *thread) static void ospf6_neighbor_last_dbdesc_release(struct event *thread) { - struct ospf6_neighbor *on = THREAD_ARG(thread); + struct ospf6_neighbor *on = EVENT_ARG(thread); assert(on); memset(&on->dbdesc_last, 0, sizeof(struct ospf6_dbdesc)); @@ -385,7 +385,7 @@ void exchange_done(struct event *thread) { struct ospf6_neighbor *on; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); assert(on); if (on->state != OSPF6_NEIGHBOR_EXCHANGE) @@ -394,12 +394,12 @@ void exchange_done(struct event *thread) if (IS_OSPF6_DEBUG_NEIGHBOR(EVENT)) zlog_debug("Neighbor Event %s: *ExchangeDone*", on->name); - THREAD_OFF(on->thread_send_dbdesc); + EVENT_OFF(on->thread_send_dbdesc); ospf6_lsdb_remove_all(on->dbdesc_list); /* RFC 2328 (10.8): Release the last dbdesc after dead_interval */ if (!CHECK_FLAG(on->dbdesc_bits, OSPF6_DBDESC_MSBIT)) { - THREAD_OFF(on->last_dbdesc_release_timer); + EVENT_OFF(on->last_dbdesc_release_timer); event_add_timer(master, ospf6_neighbor_last_dbdesc_release, on, on->ospf6_if->dead_interval, &on->last_dbdesc_release_timer); @@ -430,7 +430,7 @@ void ospf6_check_nbr_loading(struct ospf6_neighbor *on) if (on->request_list->count == 0) event_add_event(master, loading_done, on, 0, NULL); else if (on->last_ls_req == NULL) { - THREAD_OFF(on->thread_send_lsreq); + EVENT_OFF(on->thread_send_lsreq); event_add_event(master, ospf6_lsreq_send, on, 0, &on->thread_send_lsreq); } @@ -441,7 +441,7 @@ void loading_done(struct event *thread) { struct ospf6_neighbor *on; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); assert(on); if (on->state != OSPF6_NEIGHBOR_LOADING) @@ -460,7 +460,7 @@ void adj_ok(struct event *thread) { struct ospf6_neighbor *on; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); assert(on); if (IS_OSPF6_DEBUG_NEIGHBOR(EVENT)) @@ -473,7 +473,7 @@ void adj_ok(struct event *thread) SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_MBIT); SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_IBIT); - THREAD_OFF(on->thread_send_dbdesc); + EVENT_OFF(on->thread_send_dbdesc); event_add_event(master, ospf6_dbdesc_send, on, 0, &on->thread_send_dbdesc); @@ -488,7 +488,7 @@ void seqnumber_mismatch(struct event *thread) { struct ospf6_neighbor *on; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); assert(on); if (on->state < OSPF6_NEIGHBOR_EXCHANGE) @@ -505,7 +505,7 @@ void seqnumber_mismatch(struct event *thread) ospf6_neighbor_clear_ls_lists(on); - THREAD_OFF(on->thread_send_dbdesc); + EVENT_OFF(on->thread_send_dbdesc); on->dbdesc_seqnum++; /* Incr seqnum as per RFC2328, sec 10.3 */ event_add_event(master, ospf6_dbdesc_send, on, 0, @@ -516,7 +516,7 @@ void bad_lsreq(struct event *thread) { struct ospf6_neighbor *on; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); assert(on); if (on->state < OSPF6_NEIGHBOR_EXCHANGE) @@ -533,7 +533,7 @@ void bad_lsreq(struct event *thread) ospf6_neighbor_clear_ls_lists(on); - THREAD_OFF(on->thread_send_dbdesc); + EVENT_OFF(on->thread_send_dbdesc); on->dbdesc_seqnum++; /* Incr seqnum as per RFC2328, sec 10.3 */ event_add_event(master, ospf6_dbdesc_send, on, 0, @@ -544,7 +544,7 @@ void oneway_received(struct event *thread) { struct ospf6_neighbor *on; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); assert(on); if (on->state < OSPF6_NEIGHBOR_TWOWAY) @@ -559,19 +559,19 @@ void oneway_received(struct event *thread) ospf6_neighbor_clear_ls_lists(on); - THREAD_OFF(on->thread_send_dbdesc); - THREAD_OFF(on->thread_send_lsreq); - THREAD_OFF(on->thread_send_lsupdate); - THREAD_OFF(on->thread_send_lsack); - THREAD_OFF(on->thread_exchange_done); - THREAD_OFF(on->thread_adj_ok); + EVENT_OFF(on->thread_send_dbdesc); + EVENT_OFF(on->thread_send_lsreq); + EVENT_OFF(on->thread_send_lsupdate); + EVENT_OFF(on->thread_send_lsack); + EVENT_OFF(on->thread_exchange_done); + EVENT_OFF(on->thread_adj_ok); } void inactivity_timer(struct event *thread) { struct ospf6_neighbor *on; - on = (struct ospf6_neighbor *)THREAD_ARG(thread); + on = (struct ospf6_neighbor *)EVENT_ARG(thread); assert(on); if (IS_OSPF6_DEBUG_NEIGHBOR(EVENT)) diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c index 15fcab13f7..7ff0a09328 100644 --- a/ospf6d/ospf6_nssa.c +++ b/ospf6d/ospf6_nssa.c @@ -978,7 +978,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 event *thread) { - struct ospf6 *ospf6 = THREAD_ARG(thread); + struct ospf6 *ospf6 = EVENT_ARG(thread); if (IS_OSPF6_DEBUG_ABR) zlog_debug("Running ABR task on timer"); @@ -1089,7 +1089,7 @@ static void ospf6_ase_lsa_refresh(struct ospf6 *o) route->path.origin.id, o->router_id, o->lsdb); if (old) { - THREAD_OFF(old->refresh); + EVENT_OFF(old->refresh); event_add_event(master, ospf6_lsa_refresh, old, 0, &old->refresh); } else { @@ -1164,7 +1164,7 @@ void ospf6_area_nssa_update(struct ospf6_area *area) lsa)) { if (IS_OSPF6_DEBUG_NSSA) ospf6_lsa_header_print(lsa); - THREAD_OFF(lsa->refresh); + EVENT_OFF(lsa->refresh); event_add_event(master, ospf6_lsa_refresh, lsa, 0, &lsa->refresh); } diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index b8d5bfef6f..8855955116 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -599,7 +599,7 @@ static void ospf6_spf_calculation_thread(struct event *t) int areas_processed = 0; char rbuf[32]; - ospf6 = (struct ospf6 *)THREAD_ARG(t); + ospf6 = (struct ospf6 *)EVENT_ARG(t); /* execute SPF calculation */ monotime(&start); @@ -724,7 +724,7 @@ void ospf6_spf_schedule(struct ospf6 *ospf6, unsigned int reason) if (IS_OSPF6_DEBUG_SPF(PROCESS) || IS_OSPF6_DEBUG_SPF(TIME)) zlog_debug("SPF: Rescheduling in %ld msec", delay); - THREAD_OFF(ospf6->t_spf_calc); + EVENT_OFF(ospf6->t_spf_calc); event_add_timer_msec(master, ospf6_spf_calculation_thread, ospf6, delay, &ospf6->t_spf_calc); } @@ -1236,7 +1236,7 @@ static void ospf6_ase_calculate_timer(struct event *t) struct ospf6_area *area; uint16_t type; - ospf6 = THREAD_ARG(t); + ospf6 = EVENT_ARG(t); /* Calculate external route for each AS-external-LSA */ type = htons(OSPF6_LSTYPE_AS_EXTERNAL); diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 54f4d854d9..5ad79711e1 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -552,15 +552,15 @@ static void ospf6_disable(struct ospf6 *o) ospf6_route_remove_all(o->route_table); ospf6_route_remove_all(o->brouter_table); - THREAD_OFF(o->maxage_remover); - THREAD_OFF(o->t_spf_calc); - THREAD_OFF(o->t_ase_calc); - THREAD_OFF(o->t_distribute_update); - THREAD_OFF(o->t_ospf6_receive); - THREAD_OFF(o->t_external_aggr); - THREAD_OFF(o->gr_info.t_grace_period); - THREAD_OFF(o->t_write); - THREAD_OFF(o->t_abr_task); + EVENT_OFF(o->maxage_remover); + EVENT_OFF(o->t_spf_calc); + EVENT_OFF(o->t_ase_calc); + EVENT_OFF(o->t_distribute_update); + EVENT_OFF(o->t_ospf6_receive); + EVENT_OFF(o->t_external_aggr); + EVENT_OFF(o->gr_info.t_grace_period); + EVENT_OFF(o->t_write); + EVENT_OFF(o->t_abr_task); } } @@ -575,7 +575,7 @@ void ospf6_master_init(struct event_master *master) static void ospf6_maxage_remover(struct event *thread) { - struct ospf6 *o = (struct ospf6 *)THREAD_ARG(thread); + struct ospf6 *o = (struct ospf6 *)EVENT_ARG(thread); struct ospf6_area *oa; struct ospf6_interface *oi; struct ospf6_neighbor *on; |
