diff options
| author | Mark Stapp <mjs@voltanet.io> | 2020-07-17 17:09:51 -0400 | 
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2020-10-23 12:16:52 -0400 | 
| commit | 5047884528ec263215504cb5df12ebd2422cc392 (patch) | |
| tree | 952121f1a904ef9c86c1f7336a3aae757eeb3434 /lib/northbound_cli.c | |
| parent | b3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9 (diff) | |
*: unify thread/event cancel macros
Replace all lib/thread cancel macros, use thread_cancel()
everywhere. Only the THREAD_OFF macro and thread_cancel() api are
supported. Also adjust thread_cancel_async() to NULL caller's pointer (if
present).
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'lib/northbound_cli.c')
| -rw-r--r-- | lib/northbound_cli.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c index a7f3a1b305..7048df99fb 100644 --- a/lib/northbound_cli.c +++ b/lib/northbound_cli.c @@ -89,7 +89,7 @@ static int nb_cli_classic_commit(struct vty *vty)  static void nb_cli_pending_commit_clear(struct vty *vty)  { -	THREAD_TIMER_OFF(vty->t_pending_commit); +	THREAD_OFF(vty->t_pending_commit);  	vty->backoff_cmd_count = 0;  	XFREE(MTYPE_TMP, vty->pending_cmds_buf);  	vty->pending_cmds_buflen = 0; @@ -154,7 +154,7 @@ static int nb_cli_schedule_command(struct vty *vty)  					   vty->pending_cmds_buflen);  	/* Schedule the commit operation. */ -	THREAD_TIMER_OFF(vty->t_pending_commit); +	THREAD_OFF(vty->t_pending_commit);  	thread_add_timer_msec(master, nb_cli_pending_commit_cb, vty, 100,  			      &vty->t_pending_commit); @@ -312,7 +312,7 @@ int nb_cli_rpc(struct vty *vty, const char *xpath, struct list *input,  void nb_cli_confirmed_commit_clean(struct vty *vty)  { -	THREAD_TIMER_OFF(vty->t_confirmed_commit_timeout); +	thread_cancel(&vty->t_confirmed_commit_timeout);  	nb_config_free(vty->confirmed_commit_rollback);  	vty->confirmed_commit_rollback = NULL;  } @@ -377,7 +377,7 @@ static int nb_cli_commit(struct vty *vty, bool force,  				"%% Resetting confirmed-commit timeout to %u minute(s)\n\n",  				confirmed_timeout); -			THREAD_TIMER_OFF(vty->t_confirmed_commit_timeout); +			thread_cancel(&vty->t_confirmed_commit_timeout);  			thread_add_timer(master,  					 nb_cli_confirmed_commit_timeout, vty,  					 confirmed_timeout * 60,  | 
