]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: fd: remove the unused "new" field
authorWilly Tarreau <w@1wt.eu>
Sat, 20 Jan 2018 22:59:40 +0000 (23:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 29 Jan 2018 15:02:59 +0000 (16:02 +0100)
This field has been unused since 1.6, it's only updated and never
tested. Let's remove it.

include/proto/fd.h
include/types/fd.h
src/cli.c
src/ev_epoll.c
src/ev_kqueue.c
src/ev_poll.c
src/ev_select.c
src/fd.c

index c9449ff868a35a3d783a713d2f1f163c875ac7f6..5885d0cc9c1308e3510659bff36cf8817346eb79 100644 (file)
@@ -398,7 +398,6 @@ static inline void fd_insert(int fd, unsigned long thread_mask)
 {
        HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
        fdtab[fd].ev = 0;
-       fdtab[fd].new = 1;
        fdtab[fd].update_mask &= ~tid_bit;
        fdtab[fd].linger_risk = 0;
        fdtab[fd].cloned = 0;
index da9f31eddb6aa7478f28b615e7c44ebcb63edaf7..e04ea675f8f6a15ac97d189e5fc1d6d2d43a604b 100644 (file)
@@ -101,7 +101,6 @@ struct fdtab {
        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 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 cloned:1;              /* 1 if a cloned socket, requires EPOLL_CTL_DEL on close */
 };
index cff59f28ac49a5ef7a017feaf182f292e268c9f8..ed8cc5bff54db331c1b5167d5b8e04febb336f30 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -794,7 +794,7 @@ static int cli_io_handler_show_fd(struct appctx *appctx)
                        li = fdt.owner;
 
                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,
                             fdt.state,
                             (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_PRI) ? 'P' : 'p',
                             (fdt.ev & FD_POLL_IN)  ? 'I' : 'i',
-                            fdt.new ? 'N' : 'n',
                             fdt.linger_risk ? 'L' : 'l',
                             fdt.cloned ? 'C' : 'c',
                             fdt.cache,
index baa677018142b76087d9ab67fcc01112789b4772..0dd908dbcd2d5d8703a6bd7afc0c38cfb5f8e5c9 100644 (file)
@@ -81,8 +81,6 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
 
                HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
                fdtab[fd].update_mask &= ~tid_bit;
-               fdtab[fd].new = 0;
-
                eo = fdtab[fd].state;
                en = fd_compute_new_polled_status(eo);
                fdtab[fd].state = en;
index 0346ec4ef17d73db4ffdbbd1fae0993cd2665cdb..6169e63ceaed2aa1ccaf89d86df5ccf6a2668b64 100644 (file)
@@ -54,8 +54,6 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
 
                HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
                fdtab[fd].update_mask &= ~tid_bit;
-               fdtab[fd].new = 0;
-
                eo = fdtab[fd].state;
                en = fd_compute_new_polled_status(eo);
                fdtab[fd].state = en;
index 2460a67132e1288178fcfacdc4b4899621dacfcc..715314cda94509e1851c349864cac4657448e0a5 100644 (file)
@@ -84,8 +84,6 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
 
                HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
                fdtab[fd].update_mask &= ~tid_bit;
-               fdtab[fd].new = 0;
-
                eo = fdtab[fd].state;
                en = fd_compute_new_polled_status(eo);
                fdtab[fd].state = en;
index 9d53a8502e470ef520f7a5b44c6fa98ed1da4df1..2a62ba92ce9186853ac237f99322f2f4c3199a7a 100644 (file)
@@ -66,8 +66,6 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
 
                HA_SPIN_LOCK(FD_LOCK, &fdtab[fd].lock);
                fdtab[fd].update_mask &= ~tid_bit;
-               fdtab[fd].new = 0;
-
                eo = fdtab[fd].state;
                en = fd_compute_new_polled_status(eo);
                fdtab[fd].state = en;
index 9398364e4845ad3bf39912649bd963c40ff875a2..a47b61ad8a5ab3d57ab02656ebba70053b08bd83 100644 (file)
--- a/src/fd.c
+++ b/src/fd.c
@@ -198,7 +198,6 @@ static void fd_dodelete(int fd, int do_close)
        fdinfo[fd].port_range = NULL;
        fdtab[fd].owner = NULL;
        fdtab[fd].update_mask &= ~tid_bit;
-       fdtab[fd].new = 0;
        fdtab[fd].thread_mask = 0;
        if (do_close) {
                fdtab[fd].polled_mask = 0;