mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-25 20:38:03 +00:00
CLEANUP: fd: remove the unused "new" field
This field has been unused since 1.6, it's only updated and never tested. Let's remove it.
This commit is contained in:
parent
2d3c2db868
commit
745c60eac6
@ -398,7 +398,6 @@ static inline void fd_insert(int fd, unsigned long thread_mask)
|
|||||||
{
|
{
|
||||||
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
|
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
|
||||||
fdtab[fd].ev = 0;
|
fdtab[fd].ev = 0;
|
||||||
fdtab[fd].new = 1;
|
|
||||||
fdtab[fd].update_mask &= ~tid_bit;
|
fdtab[fd].update_mask &= ~tid_bit;
|
||||||
fdtab[fd].linger_risk = 0;
|
fdtab[fd].linger_risk = 0;
|
||||||
fdtab[fd].cloned = 0;
|
fdtab[fd].cloned = 0;
|
||||||
|
@ -101,7 +101,6 @@ struct fdtab {
|
|||||||
unsigned int cache; /* position+1 in the FD cache. 0=not in cache. */
|
unsigned int cache; /* position+1 in the FD cache. 0=not in cache. */
|
||||||
unsigned char state; /* FD state for read and write directions (2*3 bits) */
|
unsigned char state; /* FD state for read and write directions (2*3 bits) */
|
||||||
unsigned char ev; /* event seen in return of poll() : FD_POLL_* */
|
unsigned char ev; /* event seen in return of poll() : FD_POLL_* */
|
||||||
unsigned char new:1; /* 1 if this fd has just been created */
|
|
||||||
unsigned char linger_risk:1; /* 1 if we must kill lingering before closing */
|
unsigned char linger_risk:1; /* 1 if we must kill lingering before closing */
|
||||||
unsigned char cloned:1; /* 1 if a cloned socket, requires EPOLL_CTL_DEL on close */
|
unsigned char cloned:1; /* 1 if a cloned socket, requires EPOLL_CTL_DEL on close */
|
||||||
};
|
};
|
||||||
|
@ -794,7 +794,7 @@ static int cli_io_handler_show_fd(struct appctx *appctx)
|
|||||||
li = fdt.owner;
|
li = fdt.owner;
|
||||||
|
|
||||||
chunk_printf(&trash,
|
chunk_printf(&trash,
|
||||||
" %5d : st=0x%02x(R:%c%c%c W:%c%c%c) ev=0x%02x(%c%c%c%c%c) [%c%c%c] cache=%u owner=%p iocb=%p(%s) tmask=0x%lx umask=0x%lx",
|
" %5d : st=0x%02x(R:%c%c%c W:%c%c%c) ev=0x%02x(%c%c%c%c%c) [%c%c] cache=%u owner=%p iocb=%p(%s) tmask=0x%lx umask=0x%lx",
|
||||||
fd,
|
fd,
|
||||||
fdt.state,
|
fdt.state,
|
||||||
(fdt.state & FD_EV_POLLED_R) ? 'P' : 'p',
|
(fdt.state & FD_EV_POLLED_R) ? 'P' : 'p',
|
||||||
@ -809,7 +809,6 @@ static int cli_io_handler_show_fd(struct appctx *appctx)
|
|||||||
(fdt.ev & FD_POLL_OUT) ? 'O' : 'o',
|
(fdt.ev & FD_POLL_OUT) ? 'O' : 'o',
|
||||||
(fdt.ev & FD_POLL_PRI) ? 'P' : 'p',
|
(fdt.ev & FD_POLL_PRI) ? 'P' : 'p',
|
||||||
(fdt.ev & FD_POLL_IN) ? 'I' : 'i',
|
(fdt.ev & FD_POLL_IN) ? 'I' : 'i',
|
||||||
fdt.new ? 'N' : 'n',
|
|
||||||
fdt.linger_risk ? 'L' : 'l',
|
fdt.linger_risk ? 'L' : 'l',
|
||||||
fdt.cloned ? 'C' : 'c',
|
fdt.cloned ? 'C' : 'c',
|
||||||
fdt.cache,
|
fdt.cache,
|
||||||
|
@ -81,8 +81,6 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
|
|||||||
|
|
||||||
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
|
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
|
||||||
fdtab[fd].update_mask &= ~tid_bit;
|
fdtab[fd].update_mask &= ~tid_bit;
|
||||||
fdtab[fd].new = 0;
|
|
||||||
|
|
||||||
eo = fdtab[fd].state;
|
eo = fdtab[fd].state;
|
||||||
en = fd_compute_new_polled_status(eo);
|
en = fd_compute_new_polled_status(eo);
|
||||||
fdtab[fd].state = en;
|
fdtab[fd].state = en;
|
||||||
|
@ -54,8 +54,6 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
|
|||||||
|
|
||||||
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
|
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
|
||||||
fdtab[fd].update_mask &= ~tid_bit;
|
fdtab[fd].update_mask &= ~tid_bit;
|
||||||
fdtab[fd].new = 0;
|
|
||||||
|
|
||||||
eo = fdtab[fd].state;
|
eo = fdtab[fd].state;
|
||||||
en = fd_compute_new_polled_status(eo);
|
en = fd_compute_new_polled_status(eo);
|
||||||
fdtab[fd].state = en;
|
fdtab[fd].state = en;
|
||||||
|
@ -84,8 +84,6 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
|
|||||||
|
|
||||||
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
|
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
|
||||||
fdtab[fd].update_mask &= ~tid_bit;
|
fdtab[fd].update_mask &= ~tid_bit;
|
||||||
fdtab[fd].new = 0;
|
|
||||||
|
|
||||||
eo = fdtab[fd].state;
|
eo = fdtab[fd].state;
|
||||||
en = fd_compute_new_polled_status(eo);
|
en = fd_compute_new_polled_status(eo);
|
||||||
fdtab[fd].state = en;
|
fdtab[fd].state = en;
|
||||||
|
@ -66,8 +66,6 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
|
|||||||
|
|
||||||
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
|
HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
|
||||||
fdtab[fd].update_mask &= ~tid_bit;
|
fdtab[fd].update_mask &= ~tid_bit;
|
||||||
fdtab[fd].new = 0;
|
|
||||||
|
|
||||||
eo = fdtab[fd].state;
|
eo = fdtab[fd].state;
|
||||||
en = fd_compute_new_polled_status(eo);
|
en = fd_compute_new_polled_status(eo);
|
||||||
fdtab[fd].state = en;
|
fdtab[fd].state = en;
|
||||||
|
1
src/fd.c
1
src/fd.c
@ -198,7 +198,6 @@ static void fd_dodelete(int fd, int do_close)
|
|||||||
fdinfo[fd].port_range = NULL;
|
fdinfo[fd].port_range = NULL;
|
||||||
fdtab[fd].owner = NULL;
|
fdtab[fd].owner = NULL;
|
||||||
fdtab[fd].update_mask &= ~tid_bit;
|
fdtab[fd].update_mask &= ~tid_bit;
|
||||||
fdtab[fd].new = 0;
|
|
||||||
fdtab[fd].thread_mask = 0;
|
fdtab[fd].thread_mask = 0;
|
||||||
if (do_close) {
|
if (do_close) {
|
||||||
fdtab[fd].polled_mask = 0;
|
fdtab[fd].polled_mask = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user