summaryrefslogtreecommitdiff
path: root/nest/proto.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-06-24 19:53:34 +0200
committerMaria Matejka <mq@ucw.cz>2022-07-18 13:28:35 +0200
commite91754f5b9ef68d52f5ff3abcd24661034a0feed (patch)
tree390d7d4fcdbaeb726fe1c74b192a0a5971ea93e5 /nest/proto.c
parent08c84846089a131a0e7e9e0185b6c6ccb4ed4e2d (diff)
Event lists rewritten to a single linked list
In multithreaded environment, we need to pass messages between workers. This is done by queuing events to their respective queues. The double-linked list is not really useful for that as it needs locking everywhere. This commit rewrites the event subsystem to use a single-linked list where events are enqueued by a single atomic instruction and the queue is processed after atomically moving the whole queue aside.
Diffstat (limited to 'nest/proto.c')
-rw-r--r--nest/proto.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/nest/proto.c b/nest/proto.c
index e9bced3b..17cd08f7 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -1072,7 +1072,6 @@ proto_loop_stopped(void *ptr)
birdloop_enter(&main_birdloop);
p->loop = &main_birdloop;
- p->event->list = NULL;
proto_cleanup(p);
birdloop_leave(&main_birdloop);
@@ -1163,8 +1162,6 @@ proto_start(struct proto *p)
if (p->cf->loop_order != DOMAIN_ORDER(the_bird))
p->loop = birdloop_new(p->pool, p->cf->loop_order, p->pool->name);
- p->event->list = proto_event_list(p);
-
PROTO_LOCKED_FROM_MAIN(p)
proto_notify_state(p, (p->proto->start ? p->proto->start(p) : PS_UP));
}