mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
MINOR: fd: get rid of FD_WAIT_*
These flags were used to ease a transition which has been completed, so they're not needed anymore. Get rid of them.
This commit is contained in:
parent
3267d36c84
commit
26f44d1e91
@ -51,11 +51,6 @@ enum {
|
|||||||
#define FD_POLL_DATA (FD_POLL_IN | FD_POLL_OUT)
|
#define FD_POLL_DATA (FD_POLL_IN | FD_POLL_OUT)
|
||||||
#define FD_POLL_STICKY (FD_POLL_ERR | FD_POLL_HUP)
|
#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
|
/* bit values for fdtab[fd]->flags. Most of them are used to hold a value
|
||||||
* consecutive to a behaviour change.
|
* consecutive to a behaviour change.
|
||||||
*/
|
*/
|
||||||
|
@ -466,19 +466,8 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
|
|||||||
if ((eo & FD_EV_MASK_W) == FD_EV_SPEC_W)
|
if ((eo & FD_EV_MASK_W) == FD_EV_SPEC_W)
|
||||||
fdtab[fd].ev |= FD_POLL_OUT;
|
fdtab[fd].ev |= FD_POLL_OUT;
|
||||||
|
|
||||||
if (fdtab[fd].iocb && fdtab[fd].owner && fdtab[fd].ev) {
|
if (fdtab[fd].iocb && fdtab[fd].owner && fdtab[fd].ev)
|
||||||
int wait = fdtab[fd].iocb(fd);
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* one callback might already have closed the fd by itself */
|
/* one callback might already have closed the fd by itself */
|
||||||
if (!fdtab[fd].owner)
|
if (!fdtab[fd].owner)
|
||||||
|
Loading…
Reference in New Issue
Block a user