From f3f640b6bcf10ba463fc81cec97cfa212c520cfe Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Wed, 28 Oct 2026 17:08:17 +0100 Subject: Performance improvement, where it works: Let different udp worker threads have their own socket --- ot_udp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ot_udp.c') diff --git a/ot_udp.c b/ot_udp.c index 14210c3..87741da 100644 --- a/ot_udp.c +++ b/ot_udp.c @@ -235,13 +235,12 @@ void udp_init(void) { udp_generate_rijndael_round_key(); } -void udp_workers_install(int64_t sock, unsigned int worker_count) { +void udp_worker_install(int64_t sock) { pthread_t thread_id; #ifdef _DEBUG - fprintf(stderr, "Installing %d workers on udp socket %ld\n", worker_count, (unsigned long)sock); + fprintf(stderr, "Installing a worker on udp socket %ld\n", (unsigned long)sock); #endif - while (worker_count--) - pthread_create(&thread_id, NULL, udp_worker, (void *)sock); + pthread_create(&thread_id, NULL, udp_worker, (void *)sock); } -- cgit v1.3