ospfd: Convert thread_cancel to THREAD_OFF

Just convert all uses of thread_cancel to THREAD_OFF.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2022-06-03 10:31:04 -04:00
parent cccd44f3b1
commit bc1f09de73
3 changed files with 7 additions and 7 deletions

View file

@ -318,12 +318,12 @@ void ospf_apiserver_free(struct ospf_apiserver *apiserv)
struct listnode *node;
/* Cancel read and write threads. */
thread_cancel(&apiserv->t_sync_read);
THREAD_OFF(apiserv->t_sync_read);
#ifdef USE_ASYNC_READ
thread_cancel(&apiserv->t_async_read);
THREAD_OFF(apiserv->t_async_read);
#endif /* USE_ASYNC_READ */
thread_cancel(&apiserv->t_sync_write);
thread_cancel(&apiserv->t_async_write);
THREAD_OFF(apiserv->t_sync_write);
THREAD_OFF(apiserv->t_async_write);
/* Unregister all opaque types that application registered
and flush opaque LSAs if still in LSDB. */

View file

@ -466,7 +466,7 @@ static void ospf_ls_req_timer(struct thread *thread)
void ospf_ls_req_event(struct ospf_neighbor *nbr)
{
thread_cancel(&nbr->t_ls_req);
THREAD_OFF(nbr->t_ls_req);
thread_add_event(master, ospf_ls_req_timer, nbr, 0, &nbr->t_ls_req);
}

View file

@ -1428,7 +1428,7 @@ void ospf_ls_upd_queue_empty(struct ospf_interface *oi)
}
/* remove update event */
thread_cancel(&oi->t_ls_upd_event);
THREAD_OFF(oi->t_ls_upd_event);
}
void ospf_if_update(struct ospf *ospf, struct interface *ifp)
@ -2263,7 +2263,7 @@ static int ospf_vrf_disable(struct vrf *vrf)
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("%s: ospf old_vrf_id %d unlinked", __func__,
old_vrf_id);
thread_cancel(&ospf->t_read);
THREAD_OFF(ospf->t_read);
close(ospf->fd);
ospf->fd = -1;
}