summaryrefslogtreecommitdiff
path: root/ldpd/adjacency.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-07-17 17:09:51 -0400
committerMark Stapp <mjs@voltanet.io>2020-10-23 12:16:52 -0400
commit5047884528ec263215504cb5df12ebd2422cc392 (patch)
tree952121f1a904ef9c86c1f7336a3aae757eeb3434 /ldpd/adjacency.c
parentb3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9 (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 'ldpd/adjacency.c')
-rw-r--r--ldpd/adjacency.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ldpd/adjacency.c b/ldpd/adjacency.c
index 3923c169d6..795a41491c 100644
--- a/ldpd/adjacency.c
+++ b/ldpd/adjacency.c
@@ -198,7 +198,7 @@ adj_itimer(struct thread *thread)
void
adj_start_itimer(struct adj *adj)
{
- THREAD_TIMER_OFF(adj->inactivity_timer);
+ thread_cancel(&adj->inactivity_timer);
adj->inactivity_timer = NULL;
thread_add_timer(master, adj_itimer, adj, adj->holdtime,
&adj->inactivity_timer);
@@ -207,7 +207,7 @@ adj_start_itimer(struct adj *adj)
void
adj_stop_itimer(struct adj *adj)
{
- THREAD_TIMER_OFF(adj->inactivity_timer);
+ thread_cancel(&adj->inactivity_timer);
}
/* targeted neighbors */
@@ -359,7 +359,7 @@ tnbr_hello_timer(struct thread *thread)
static void
tnbr_start_hello_timer(struct tnbr *tnbr)
{
- THREAD_TIMER_OFF(tnbr->hello_timer);
+ thread_cancel(&tnbr->hello_timer);
tnbr->hello_timer = NULL;
thread_add_timer(master, tnbr_hello_timer, tnbr, tnbr_get_hello_interval(tnbr),
&tnbr->hello_timer);
@@ -368,7 +368,7 @@ tnbr_start_hello_timer(struct tnbr *tnbr)
static void
tnbr_stop_hello_timer(struct tnbr *tnbr)
{
- THREAD_TIMER_OFF(tnbr->hello_timer);
+ thread_cancel(&tnbr->hello_timer);
}
struct ctl_adj *