summaryrefslogtreecommitdiff
path: root/nest/rt-table.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-07-18 12:33:00 +0200
committerMaria Matejka <mq@ucw.cz>2022-07-18 12:33:00 +0200
commit08c84846089a131a0e7e9e0185b6c6ccb4ed4e2d (patch)
treebcf82552565dcdb0c5e722a0bb837b1e948ed955 /nest/rt-table.c
parent4b6f5ee8709b2fae9da13c58bfbae21b84cd40c5 (diff)
parent94eb0858c2b938549d9d1703c872c6149901e7dd (diff)
Merge commit '94eb0858' into thread-next
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 85a6faf7..ca092678 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -1415,6 +1415,12 @@ rt_next_export(struct rt_export_hook *hook, struct rt_exporter *tab)
return tab->first;
}
+static inline void
+rt_send_export_event(struct rt_export_hook *hook)
+{
+ ev_send(hook->req->list, hook->event);
+}
+
static void
rt_announce_exports(timer *tm)
{
@@ -1426,7 +1432,7 @@ rt_announce_exports(timer *tm)
if (atomic_load_explicit(&c->export_state, memory_order_acquire) != TES_READY)
continue;
- ev_schedule_work(c->event);
+ rt_send_export_event(c);
}
}
@@ -1479,7 +1485,7 @@ rt_export_hook(void *_data)
rte_update_unlock();
}
- ev_schedule_work(c->event);
+ rt_send_export_event(c);
}
@@ -2097,7 +2103,7 @@ rt_request_export(struct rt_exporter *re, struct rt_export_request *req)
/* Regular export */
rt_set_export_state(hook, TES_FEEDING);
- ev_schedule_work(hook->event);
+ rt_send_export_event(hook);
}
static void
@@ -2146,7 +2152,7 @@ rt_stop_export(struct rt_export_request *req, void (*stopped)(struct rt_export_r
rt_set_export_state(hook, TES_STOP);
/* Run the stopped event */
- ev_schedule(hook->event);
+ rt_send_export_event(hook);
}
/**
@@ -3727,7 +3733,7 @@ rt_feed_done(struct rt_export_hook *c)
rt_set_export_state(c, TES_READY);
- ev_schedule_work(c->event);
+ rt_send_export_event(c);
}
/**
@@ -3756,7 +3762,7 @@ rt_feed_by_fib(void *data)
if (max_feed <= 0)
{
FIB_ITERATE_PUT(fit);
- ev_schedule_work(c->event);
+ rt_send_export_event(c);
return;
}