fd_insert() was already given a thread group ID and a global thread mask.
Now we're changing the few callers to take the group-local thread mask
instead. It's passed directly into the FD's thread mask. Just like for
previous commit, it must not change anything when a single group is
configured.
/* Add the fd in the fd list and update its parameters */
dgram->t.sock.fd = fd;
- fd_insert(fd, dgram, dgram_fd_handler, tgid, all_threads_mask);
+ fd_insert(fd, dgram, dgram_fd_handler, tgid, tg->threads_enabled);
fd_want_recv(fd);
return 0;
}
poller_rd_pipe = mypipe[0];
poller_wr_pipe[tid] = mypipe[1];
fd_set_nonblock(poller_rd_pipe);
- fd_insert(poller_rd_pipe, poller_pipe_io_handler, poller_pipe_io_handler, tgid, tid_bit);
- fd_insert(poller_wr_pipe[tid], poller_pipe_io_handler, poller_pipe_io_handler, tgid, tid_bit);
+ fd_insert(poller_rd_pipe, poller_pipe_io_handler, poller_pipe_io_handler, tgid, ti->ltid_bit);
+ fd_insert(poller_wr_pipe[tid], poller_pipe_io_handler, poller_pipe_io_handler, tgid, ti->ltid_bit);
fd_want_recv(poller_rd_pipe);
fd_stop_both(poller_wr_pipe[tid]);
return 1;
void sock_conn_ctrl_init(struct connection *conn)
{
BUG_ON(conn->flags & CO_FL_FDLESS);
- fd_insert(conn->handle.fd, conn, sock_conn_iocb, tgid, tid_bit);
+ fd_insert(conn->handle.fd, conn, sock_conn_iocb, tgid, ti->ltid_bit);
}
/* This completes the release of connection <conn> by removing its FD from the
/* We add new fds to the fdtab */
for (i=0 ; i < num_add_fds ; i++) {
- fd_insert(add_fd[i], ctx, ssl_async_fd_handler, tgid, tid_bit);
+ fd_insert(add_fd[i], ctx, ssl_async_fd_handler, tgid, ti->ltid_bit);
}
num_add_fds = 0;