diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-05-20 14:19:08 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-03-24 08:32:17 -0400 | 
| commit | 907a2395f423e3b97335d554557c2cef7195db84 (patch) | |
| tree | 18ea691bc5589fa570c739a9f221429633778ea9 /ripd | |
| parent | e6685141aae8fc869d49cde1d459f73b87bbec89 (diff) | |
*: Convert thread_add_XXX functions to event_add_XXX
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ripd')
| -rw-r--r-- | ripd/rip_interface.c | 4 | ||||
| -rw-r--r-- | ripd/rip_peer.c | 4 | ||||
| -rw-r--r-- | ripd/ripd.c | 20 | ||||
| -rw-r--r-- | ripd/ripd.h | 2 | 
4 files changed, 15 insertions, 15 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index a32913766c..a085bc3f96 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -885,8 +885,8 @@ void rip_enable_apply(struct interface *ifp)  			zlog_debug("turn on %s", ifp->name);  		/* Add interface wake up thread. */ -		thread_add_timer(master, rip_interface_wakeup, ifp, 1, -				 &ri->t_wakeup); +		event_add_timer(master, rip_interface_wakeup, ifp, 1, +				&ri->t_wakeup);  		rip_connect_set(ifp, 1);  	} else if (ri->running) {  		/* Might as well clean up the route table as well diff --git a/ripd/rip_peer.c b/ripd/rip_peer.c index 88094e9836..99338f4e8a 100644 --- a/ripd/rip_peer.c +++ b/ripd/rip_peer.c @@ -78,8 +78,8 @@ static struct rip_peer *rip_peer_get(struct rip *rip, struct in_addr *addr)  	}  	/* Update timeout thread. */ -	thread_add_timer(master, rip_peer_timeout, peer, RIP_PEER_TIMER_DEFAULT, -			 &peer->t_timeout); +	event_add_timer(master, rip_peer_timeout, peer, RIP_PEER_TIMER_DEFAULT, +			&peer->t_timeout);  	/* Last update time set. */  	time(&peer->uptime); diff --git a/ripd/ripd.c b/ripd/ripd.c index 8cc339e7c6..70bcfef4e4 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -299,8 +299,8 @@ static void rip_timeout_update(struct rip *rip, struct rip_info *rinfo)  {  	if (rinfo->metric != RIP_METRIC_INFINITY) {  		THREAD_OFF(rinfo->t_timeout); -		thread_add_timer(master, rip_timeout, rinfo, rip->timeout_time, -				 &rinfo->t_timeout); +		event_add_timer(master, rip_timeout, rinfo, rip->timeout_time, +				&rinfo->t_timeout);  	}  } @@ -2558,8 +2558,8 @@ static void rip_triggered_update(struct event *t)  	 update is triggered when the timer expires. */  	interval = (frr_weak_random() % 5) + 1; -	thread_add_timer(master, rip_triggered_interval, rip, interval, -			 &rip->t_triggered_interval); +	event_add_timer(master, rip_triggered_interval, rip, interval, +			&rip->t_triggered_interval);  }  /* Withdraw redistributed route. */ @@ -2766,21 +2766,21 @@ void rip_event(struct rip *rip, enum rip_event event, int sock)  	switch (event) {  	case RIP_READ: -		thread_add_read(master, rip_read, rip, sock, &rip->t_read); +		event_add_read(master, rip_read, rip, sock, &rip->t_read);  		break;  	case RIP_UPDATE_EVENT:  		THREAD_OFF(rip->t_update);  		jitter = rip_update_jitter(rip->update_time); -		thread_add_timer(master, rip_update, rip, -				 sock ? 2 : rip->update_time + jitter, -				 &rip->t_update); +		event_add_timer(master, rip_update, rip, +				sock ? 2 : rip->update_time + jitter, +				&rip->t_update);  		break;  	case RIP_TRIGGERED_UPDATE:  		if (rip->t_triggered_interval)  			rip->trigger = 1;  		else -			thread_add_event(master, rip_triggered_update, rip, 0, -					 &rip->t_triggered_update); +			event_add_event(master, rip_triggered_update, rip, 0, +					&rip->t_triggered_update);  		break;  	default:  		break; diff --git a/ripd/ripd.h b/ripd/ripd.h index b987ee1a42..4ae13e0d19 100644 --- a/ripd/ripd.h +++ b/ripd/ripd.h @@ -387,7 +387,7 @@ enum rip_event {  };  /* Macro for timer turn on. */ -#define RIP_TIMER_ON(T,F,V) thread_add_timer (master, (F), rinfo, (V), &(T)) +#define RIP_TIMER_ON(T, F, V) event_add_timer(master, (F), rinfo, (V), &(T))  #define RIP_OFFSET_LIST_IN  0  #define RIP_OFFSET_LIST_OUT 1  | 
