From 34aae2fd1293872345056a32dec8047a67c3d852 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Tue, 5 Jul 2022 00:55:09 +0200 Subject: [PATCH] MEDIUM: mworker: set the iocb of the socketpair without using fd_insert() The worker was previously changing the iocb of the socketpair in the worker by mworker_accept_wrapper(). However, it was done using fd_insert() instead of changing directly the callback in the fdtab[].iocb pointer. This patch cleans up this by part by removing fd_insert(). It also stops setting tid_bit on the thread mask, the socketpair will be handled by any thread from now. --- src/mworker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mworker.c b/src/mworker.c index 6a4fce48c2..364d0a956c 100644 --- a/src/mworker.c +++ b/src/mworker.c @@ -425,7 +425,7 @@ static int mworker_pipe_register_per_thread() /* In multi-tread, we need only one thread to process * events on the pipe with master */ - fd_insert(proc_self->ipc_fd[1], fdtab[proc_self->ipc_fd[1]].owner, mworker_accept_wrapper, tid_bit); + fdtab[proc_self->ipc_fd[1]].iocb = mworker_accept_wrapper; fd_want_recv(proc_self->ipc_fd[1]); return 1; } -- 2.39.5