mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-23 21:22:17 +00:00
MINOR: pollers: add a new flag to indicate pollers reporting ERR & HUP
In practice it's all pollers except select(). It turns out that we're keeping some legacy code only for select and enforcing it on all pollers, let's offer the pollers the ability to declare that they do not need that.
This commit is contained in:
parent
8081abe26a
commit
11ef0837af
@ -162,7 +162,8 @@ struct fdinfo {
|
||||
* - flags indicate what the poller supports (HAP_POLL_F_*)
|
||||
*/
|
||||
|
||||
#define HAP_POLL_F_RDHUP 0x00000001 /* the poller notifies of HUP with reads */
|
||||
#define HAP_POLL_F_RDHUP 0x00000001 /* the poller notifies of HUP with reads */
|
||||
#define HAP_POLL_F_ERRHUP 0x00000002 /* the poller reports ERR and HUP */
|
||||
|
||||
struct poller {
|
||||
void *private; /* any private data for the poller */
|
||||
|
@ -360,7 +360,7 @@ static void _do_register(void)
|
||||
|
||||
p->name = "epoll";
|
||||
p->pref = 300;
|
||||
p->flags = 0;
|
||||
p->flags = HAP_POLL_F_ERRHUP; // note: RDHUP might be dynamically added
|
||||
p->private = NULL;
|
||||
|
||||
p->clo = __fd_clo;
|
||||
|
@ -422,7 +422,7 @@ static void _do_register(void)
|
||||
|
||||
p->name = "evports";
|
||||
p->pref = 300;
|
||||
p->flags = 0;
|
||||
p->flags = HAP_POLL_F_ERRHUP;
|
||||
p->private = NULL;
|
||||
|
||||
p->clo = NULL;
|
||||
|
@ -358,7 +358,7 @@ static void _do_register(void)
|
||||
|
||||
p->name = "kqueue";
|
||||
p->pref = 300;
|
||||
p->flags = HAP_POLL_F_RDHUP;
|
||||
p->flags = HAP_POLL_F_RDHUP | HAP_POLL_F_ERRHUP;
|
||||
p->private = NULL;
|
||||
|
||||
p->clo = NULL;
|
||||
|
@ -328,7 +328,7 @@ static void _do_register(void)
|
||||
|
||||
p->name = "poll";
|
||||
p->pref = 200;
|
||||
p->flags = 0;
|
||||
p->flags = HAP_POLL_F_ERRHUP;
|
||||
p->private = NULL;
|
||||
|
||||
p->clo = __fd_clo;
|
||||
|
Loading…
Reference in New Issue
Block a user