diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-12-11 10:51:58 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-03-24 08:32:17 -0400 |
| commit | 5f6eaa9b9668f3f09fbf6b1dc4e0645e07f641c9 (patch) | |
| tree | d8639a3f042a0de1e66bad71d330205619052b6e /ospf6d/ospf6_interface.c | |
| parent | 70c35c11f2af5f169db446ef02ac0dda7b2822fc (diff) | |
*: Convert a bunch of thread_XX to event_XX
Convert these functions:
thread_getrusage
thread_cmd_init
thread_consumed_time
thread_timer_to_hhmmss
thread_is_scheduled
thread_ignore_late_timer
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospf6d/ospf6_interface.c')
| -rw-r--r-- | ospf6d/ospf6_interface.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 2c8d168e09..f195b17103 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -1140,7 +1140,7 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp, if (use_json) { timerclear(&res); - if (thread_is_scheduled(oi->thread_send_lsupdate)) + if (event_is_scheduled(oi->thread_send_lsupdate)) timersub(&oi->thread_send_lsupdate->u.sands, &now, &res); timerstring(&res, duration, sizeof(duration)); @@ -1150,9 +1150,8 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp, duration); json_object_string_add( json_obj, "lsUpdateSendThread", - (thread_is_scheduled(oi->thread_send_lsupdate) - ? "on" - : "off")); + (event_is_scheduled(oi->thread_send_lsupdate) ? "on" + : "off")); json_arr = json_object_new_array(); for (ALL_LSDB(oi->lsupdate_list, lsa, lsanext)) @@ -1162,7 +1161,7 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp, json_arr); timerclear(&res); - if (thread_is_scheduled(oi->thread_send_lsack)) + if (event_is_scheduled(oi->thread_send_lsack)) timersub(&oi->thread_send_lsack->u.sands, &now, &res); timerstring(&res, duration, sizeof(duration)); @@ -1172,8 +1171,8 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp, duration); json_object_string_add( json_obj, "lsAckSendThread", - (thread_is_scheduled(oi->thread_send_lsack) ? "on" - : "off")); + (event_is_scheduled(oi->thread_send_lsack) ? "on" + : "off")); json_arr = json_object_new_array(); for (ALL_LSDB(oi->lsack_list, lsa, lsanext)) @@ -1183,28 +1182,27 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp, } else { timerclear(&res); - if (thread_is_scheduled(oi->thread_send_lsupdate)) + if (event_is_scheduled(oi->thread_send_lsupdate)) timersub(&oi->thread_send_lsupdate->u.sands, &now, &res); timerstring(&res, duration, sizeof(duration)); vty_out(vty, " %d Pending LSAs for LSUpdate in Time %s [thread %s]\n", oi->lsupdate_list->count, duration, - (thread_is_scheduled(oi->thread_send_lsupdate) - ? "on" - : "off")); + (event_is_scheduled(oi->thread_send_lsupdate) ? "on" + : "off")); for (ALL_LSDB(oi->lsupdate_list, lsa, lsanext)) vty_out(vty, " %s\n", lsa->name); timerclear(&res); - if (thread_is_scheduled(oi->thread_send_lsack)) + if (event_is_scheduled(oi->thread_send_lsack)) timersub(&oi->thread_send_lsack->u.sands, &now, &res); timerstring(&res, duration, sizeof(duration)); vty_out(vty, " %d Pending LSAs for LSAck in Time %s [thread %s]\n", oi->lsack_list->count, duration, - (thread_is_scheduled(oi->thread_send_lsack) ? "on" - : "off")); + (event_is_scheduled(oi->thread_send_lsack) ? "on" + : "off")); for (ALL_LSDB(oi->lsack_list, lsa, lsanext)) vty_out(vty, " %s\n", lsa->name); } @@ -2107,7 +2105,7 @@ DEFUN (ipv6_ospf6_hellointerval, /* * If the thread is scheduled, send the new hello now. */ - if (thread_is_scheduled(oi->thread_send_hello)) { + if (event_is_scheduled(oi->thread_send_hello)) { THREAD_OFF(oi->thread_send_hello); event_add_timer(master, ospf6_hello_send, oi, 0, |
