mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 00:57:02 +02:00
MEDIUM: fd: make fd_insert() take local thread masks
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.
This commit is contained in:
parent
3638d174e5
commit
27a3245599
@ -74,7 +74,7 @@ static int dns_connect_nameserver(struct dns_nameserver *ns)
|
|||||||
|
|
||||||
/* Add the fd in the fd list and update its parameters */
|
/* Add the fd in the fd list and update its parameters */
|
||||||
dgram->t.sock.fd = fd;
|
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);
|
fd_want_recv(fd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
4
src/fd.c
4
src/fd.c
@ -855,8 +855,8 @@ static int init_pollers_per_thread()
|
|||||||
poller_rd_pipe = mypipe[0];
|
poller_rd_pipe = mypipe[0];
|
||||||
poller_wr_pipe[tid] = mypipe[1];
|
poller_wr_pipe[tid] = mypipe[1];
|
||||||
fd_set_nonblock(poller_rd_pipe);
|
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_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, tid_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_want_recv(poller_rd_pipe);
|
||||||
fd_stop_both(poller_wr_pipe[tid]);
|
fd_stop_both(poller_wr_pipe[tid]);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -703,7 +703,7 @@ void sock_accept_iocb(int fd)
|
|||||||
void sock_conn_ctrl_init(struct connection *conn)
|
void sock_conn_ctrl_init(struct connection *conn)
|
||||||
{
|
{
|
||||||
BUG_ON(conn->flags & CO_FL_FDLESS);
|
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
|
/* This completes the release of connection <conn> by removing its FD from the
|
||||||
|
@ -824,7 +824,7 @@ static inline void ssl_async_process_fds(struct ssl_sock_ctx *ctx)
|
|||||||
|
|
||||||
/* We add new fds to the fdtab */
|
/* We add new fds to the fdtab */
|
||||||
for (i=0 ; i < num_add_fds ; i++) {
|
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;
|
num_add_fds = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user