mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-28 05:48:01 +00:00
[MINOR] use 'is_set' instead of 'isset' in struct poller
'isset' was defined as a macro in /usr/include/sys/param.h, and it breaks build on at least OpenBSD.
This commit is contained in:
parent
69801b8e77
commit
63455a9be5
@ -53,7 +53,7 @@ void run_poller();
|
||||
|
||||
#define EV_FD_SET(fd, ev) (cur_poller.set((fd), (ev)))
|
||||
#define EV_FD_CLR(fd, ev) (cur_poller.clr((fd), (ev)))
|
||||
#define EV_FD_ISSET(fd, ev) (cur_poller.isset((fd), (ev)))
|
||||
#define EV_FD_ISSET(fd, ev) (cur_poller.is_set((fd), (ev)))
|
||||
#define EV_FD_COND_S(fd, ev) (cur_poller.cond_s((fd), (ev)))
|
||||
#define EV_FD_COND_C(fd, ev) (cur_poller.cond_c((fd), (ev)))
|
||||
#define EV_FD_REM(fd) (cur_poller.rem(fd))
|
||||
|
@ -2,7 +2,7 @@
|
||||
include/types/fd.h
|
||||
File descriptors states.
|
||||
|
||||
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
|
||||
Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
@ -73,7 +73,7 @@ struct fdtab {
|
||||
*/
|
||||
struct poller {
|
||||
void *private; /* any private data for the poller */
|
||||
REGPRM2 int (*isset)(const int fd, int dir); /* check if <fd> is being polled for dir <dir> */
|
||||
REGPRM2 int (*is_set)(const int fd, int dir); /* check if <fd> is being polled for dir <dir> */
|
||||
REGPRM2 int (*set)(const int fd, int dir); /* set polling on <fd> for <dir> */
|
||||
REGPRM2 int (*clr)(const int fd, int dir); /* clear polling on <fd> for <dir> */
|
||||
REGPRM2 int (*cond_s)(const int fd, int dir); /* set polling on <fd> for <dir> if unset */
|
||||
|
@ -49,7 +49,7 @@ static int epoll_fd;
|
||||
* instead of the usual macros improve the FD_* performance by about 80%,
|
||||
* and that marking them regparm(2) adds another 20%.
|
||||
*/
|
||||
REGPRM2 static int __fd_isset(const int fd, int dir)
|
||||
REGPRM2 static int __fd_is_set(const int fd, int dir)
|
||||
{
|
||||
return FD_ISSET(fd, fd_evts[dir]);
|
||||
}
|
||||
@ -308,7 +308,7 @@ int epoll_register(struct poller *p)
|
||||
p->init = epoll_init;
|
||||
p->term = epoll_term;
|
||||
p->poll = epoll_poll;
|
||||
p->isset = __fd_isset;
|
||||
p->is_set = __fd_is_set;
|
||||
p->set = __fd_set;
|
||||
p->clr = __fd_clr;
|
||||
p->rem = __fd_rem;
|
||||
|
@ -54,7 +54,7 @@ REGPRM3 static int kqev_del(struct kevent *kev, const int fd, const int dir)
|
||||
/*
|
||||
* Returns non-zero if direction <dir> is already set for <fd>.
|
||||
*/
|
||||
REGPRM2 static int __fd_isset(const int fd, int dir)
|
||||
REGPRM2 static int __fd_is_set(const int fd, int dir)
|
||||
{
|
||||
return FD_ISSET(fd, fd_evts[dir]);
|
||||
}
|
||||
@ -220,7 +220,7 @@ int kqueue_register(struct poller *p)
|
||||
p->term = kqueue_term;
|
||||
p->poll = kqueue_poll;
|
||||
|
||||
p->isset = __fd_isset;
|
||||
p->is_set = __fd_is_set;
|
||||
p->cond_s = p->set = __fd_set;
|
||||
p->cond_c = p->clr = __fd_clr;
|
||||
p->clo = p->rem = __fd_rem;
|
||||
|
@ -37,7 +37,7 @@ static struct pollfd *poll_events = NULL;
|
||||
* instead of the usual macros improve the FD_* performance by about 80%,
|
||||
* and that marking them regparm(2) adds another 20%.
|
||||
*/
|
||||
REGPRM2 static int __fd_isset(const int fd, int dir)
|
||||
REGPRM2 static int __fd_is_set(const int fd, int dir)
|
||||
{
|
||||
return FD_ISSET(fd, fd_evts[dir]);
|
||||
}
|
||||
@ -216,7 +216,7 @@ int poll_register(struct poller *p)
|
||||
p->init = poll_init;
|
||||
p->term = poll_term;
|
||||
p->poll = poll_poll;
|
||||
p->isset = __fd_isset;
|
||||
p->is_set = __fd_is_set;
|
||||
p->set = __fd_set;
|
||||
p->clr = __fd_clr;
|
||||
p->clo = p->rem = __fd_rem;
|
||||
|
@ -34,7 +34,7 @@ static fd_set *tmp_evts[2];
|
||||
* instead of the usual macros improve the FD_* performance by about 80%,
|
||||
* and that marking them regparm(2) adds another 20%.
|
||||
*/
|
||||
REGPRM2 static int __fd_isset(const int fd, int dir)
|
||||
REGPRM2 static int __fd_is_set(const int fd, int dir)
|
||||
{
|
||||
return FD_ISSET(fd, fd_evts[dir]);
|
||||
}
|
||||
@ -216,7 +216,7 @@ int select_register(struct poller *p)
|
||||
p->init = select_init;
|
||||
p->term = select_term;
|
||||
p->poll = select_poll;
|
||||
p->isset = __fd_isset;
|
||||
p->is_set = __fd_is_set;
|
||||
p->set = __fd_set;
|
||||
p->clr = __fd_clr;
|
||||
p->clo = p->rem = __fd_rem;
|
||||
|
Loading…
Reference in New Issue
Block a user