]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: fd: get rid of FD_WAIT_*
authorWilly Tarreau <w@1wt.eu>
Fri, 17 Aug 2012 21:55:05 +0000 (23:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Sep 2012 19:53:12 +0000 (21:53 +0200)
These flags were used to ease a transition which has been completed,
so they're not needed anymore. Get rid of them.

include/types/fd.h
src/ev_sepoll.c

index c6e47f2033381b305d95cf2ed4a6be8600994c78..c9b50c2e5e77fb3b514cca188c403c02b76b0d1b 100644 (file)
@@ -51,11 +51,6 @@ enum {
 #define FD_POLL_DATA    (FD_POLL_IN  | FD_POLL_OUT)
 #define FD_POLL_STICKY  (FD_POLL_ERR | FD_POLL_HUP)
 
-/* flags that an I/O callback may return */
-#define FD_WAIT_READ    0x01
-#define FD_WAIT_WRITE   0x02
-#define FD_WAIT_BOTH    (FD_WAIT_READ|FD_WAIT_WRITE)
-
 /* bit values for fdtab[fd]->flags. Most of them are used to hold a value
  * consecutive to a behaviour change.
  */
index 506ab3103e975f27bc265cf4beddbf3ebd1e43f6..7c1cf4c535708931344875ef88060f84509dd177 100644 (file)
@@ -466,19 +466,8 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
                if ((eo & FD_EV_MASK_W) == FD_EV_SPEC_W)
                        fdtab[fd].ev |= FD_POLL_OUT;
 
-               if (fdtab[fd].iocb && fdtab[fd].owner && fdtab[fd].ev) {
-                       int wait = fdtab[fd].iocb(fd);
-
-                       /* FIXME: warning, this will not work if both old and new
-                        * callbacks are used at the same time ! This is only a
-                        * temporary measure during the migration.
-                        */
-                       if (wait & FD_WAIT_READ)
-                               fdtab[fd].spec.e ^= (FD_EV_WAIT_R ^ FD_EV_SPEC_R);
-
-                       if (wait & FD_WAIT_WRITE)
-                               fdtab[fd].spec.e ^= (FD_EV_WAIT_W ^ FD_EV_SPEC_W);
-               }
+               if (fdtab[fd].iocb && fdtab[fd].owner && fdtab[fd].ev)
+                       fdtab[fd].iocb(fd);
 
                /* one callback might already have closed the fd by itself */
                if (!fdtab[fd].owner)