diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-05-20 20:19:08 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2023-03-24 13:32:17 +0100 |
commit | 907a2395f423e3b97335d554557c2cef7195db84 (patch) | |
tree | 18ea691bc5589fa570c739a9f221429633778ea9 /ripngd/ripngd.c | |
parent | *: Rename `struct thread` to `struct event` (diff) | |
download | frr-907a2395f423e3b97335d554557c2cef7195db84.tar.xz frr-907a2395f423e3b97335d554557c2cef7195db84.zip |
*: Convert thread_add_XXX functions to event_add_XXX
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ripngd/ripngd.c')
-rw-r--r-- | ripngd/ripngd.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 3bf0e3021..00d0414b7 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -597,8 +597,8 @@ static void ripng_timeout_update(struct ripng *ripng, struct ripng_info *rinfo) { if (rinfo->metric != RIPNG_METRIC_INFINITY) { THREAD_OFF(rinfo->t_timeout); - thread_add_timer(master, ripng_timeout, rinfo, - ripng->timeout_time, &rinfo->t_timeout); + event_add_timer(master, ripng_timeout, rinfo, + ripng->timeout_time, &rinfo->t_timeout); } } @@ -1493,8 +1493,8 @@ void ripng_triggered_update(struct event *t) update is triggered when the timer expires. */ interval = (frr_weak_random() % 5) + 1; - thread_add_timer(master, ripng_triggered_interval, ripng, interval, - &ripng->t_triggered_interval); + event_add_timer(master, ripng_triggered_interval, ripng, interval, + &ripng->t_triggered_interval); } /* Write routing table entry to the stream and return next index of @@ -1898,8 +1898,7 @@ void ripng_event(struct ripng *ripng, enum ripng_event event, int sock) switch (event) { case RIPNG_READ: - thread_add_read(master, ripng_read, ripng, sock, - &ripng->t_read); + event_add_read(master, ripng_read, ripng, sock, &ripng->t_read); break; case RIPNG_UPDATE_EVENT: THREAD_OFF(ripng->t_update); @@ -1907,16 +1906,16 @@ void ripng_event(struct ripng *ripng, enum ripng_event event, int sock) /* Update timer jitter. */ jitter = ripng_update_jitter(ripng->update_time); - thread_add_timer(master, ripng_update, ripng, - sock ? 2 : ripng->update_time + jitter, - &ripng->t_update); + event_add_timer(master, ripng_update, ripng, + sock ? 2 : ripng->update_time + jitter, + &ripng->t_update); break; case RIPNG_TRIGGERED_UPDATE: if (ripng->t_triggered_interval) ripng->trigger = 1; else - thread_add_event(master, ripng_triggered_update, ripng, - 0, &ripng->t_triggered_update); + event_add_event(master, ripng_triggered_update, ripng, + 0, &ripng->t_triggered_update); break; case RIPNG_ZEBRA: case RIPNG_REQUEST_EVENT: |