From e91754f5b9ef68d52f5ff3abcd24661034a0feed Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Fri, 24 Jun 2022 19:53:34 +0200 Subject: 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. --- nest/proto.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'nest') 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)); } -- cgit v1.2.3