diff options
Diffstat (limited to 'ospfd/ospf_lsa.c')
| -rw-r--r-- | ospfd/ospf_lsa.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 8b34ce6d76..82f7b96fd5 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -14,7 +14,7 @@ #include "memory.h" #include "stream.h" #include "log.h" -#include "thread.h" +#include "frrevent.h" #include "hash.h" #include "sockunion.h" /* for inet_aton() */ #include "checksum.h" @@ -742,9 +742,9 @@ 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); + struct ospf_area *area = EVENT_ARG(t); area->t_stub_router = NULL; @@ -3042,9 +3042,9 @@ 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 *ospf = EVENT_ARG(thread); struct ospf_lsa *lsa, *old; struct route_node *rn; int reschedule = 0; @@ -3074,7 +3074,7 @@ void ospf_maxage_lsa_remover(struct thread *thread) } /* TODO: maybe convert this function to a work-queue */ - if (thread_should_yield(thread)) { + if (event_should_yield(thread)) { OSPF_TIMER_ON(ospf->t_maxage, ospf_maxage_lsa_remover, 0); route_unlock_node( @@ -3290,9 +3290,9 @@ 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 ospf *ospf = EVENT_ARG(thread); struct route_node *rn; struct ospf_lsa *lsa; struct ospf_area *area; @@ -3652,8 +3652,8 @@ void ospf_flush_self_originated_lsas_now(struct ospf *ospf) * without conflicting to other threads. */ if (ospf->t_maxage != NULL) { - THREAD_OFF(ospf->t_maxage); - thread_execute(master, ospf_maxage_lsa_remover, ospf, 0); + EVENT_OFF(ospf->t_maxage); + event_execute(master, ospf_maxage_lsa_remover, ospf, 0); } return; @@ -3838,11 +3838,11 @@ 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; - data = THREAD_ARG(t); + data = EVENT_ARG(t); if (IS_DEBUG_OSPF(lsa, LSA) == OSPF_DEBUG_LSA) zlog_debug("LSA[Action]: Performing scheduled LSA action: %d", @@ -3870,7 +3870,7 @@ void ospf_schedule_lsa_flood_area(struct ospf_area *area, struct ospf_lsa *lsa) data->area = area; data->lsa = ospf_lsa_lock(lsa); /* Message / Flood area */ - thread_add_event(master, ospf_lsa_action, data, 0, NULL); + event_add_event(master, ospf_lsa_action, data, 0, NULL); } void ospf_schedule_lsa_flush_area(struct ospf_area *area, struct ospf_lsa *lsa) @@ -3882,7 +3882,7 @@ void ospf_schedule_lsa_flush_area(struct ospf_area *area, struct ospf_lsa *lsa) data->area = area; data->lsa = ospf_lsa_lock(lsa); /* Message / Flush area */ - thread_add_event(master, ospf_lsa_action, data, 0, NULL); + event_add_event(master, ospf_lsa_action, data, 0, NULL); } @@ -4029,11 +4029,11 @@ 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; - struct ospf *ospf = THREAD_ARG(t); + struct ospf *ospf = EVENT_ARG(t); struct ospf_lsa *lsa; int i; struct list *lsa_to_refresh = list_new(); @@ -4091,8 +4091,8 @@ void ospf_lsa_refresh_walker(struct thread *t) } ospf->t_lsa_refresher = NULL; - thread_add_timer(master, ospf_lsa_refresh_walker, ospf, - ospf->lsa_refresh_interval, &ospf->t_lsa_refresher); + event_add_timer(master, ospf_lsa_refresh_walker, ospf, + ospf->lsa_refresh_interval, &ospf->t_lsa_refresher); ospf->lsa_refresher_started = monotime(NULL); for (ALL_LIST_ELEMENTS(lsa_to_refresh, node, nnode, lsa)) { |
