#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))
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
*/
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 */
* 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]);
}
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;
/*
* 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]);
}
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;
* 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]);
}
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;
* 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]);
}
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;