[MINOR] pollers should not use MY_FD_*

This commit is contained in:
Willy Tarreau 2007-04-08 09:32:47 +02:00
parent 42c7659669
commit b3107b9383
1 changed files with 20 additions and 20 deletions

View File

@ -163,16 +163,16 @@ int epoll_loop(int action)
sr = (rn >> count) & 1;
sw = (wn >> count) & 1;
#else
pr = MY_FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&ro);
pw = MY_FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&wo);
sr = MY_FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&rn);
sw = MY_FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&wn);
pr = FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&ro);
pw = FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&wo);
sr = FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&rn);
sw = FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&wn);
#endif
#else
pr = MY_FD_ISSET(fd, PrevReadEvent);
pw = MY_FD_ISSET(fd, PrevWriteEvent);
sr = MY_FD_ISSET(fd, StaticReadEvent);
sw = MY_FD_ISSET(fd, StaticWriteEvent);
pr = FD_ISSET(fd, PrevReadEvent);
pw = FD_ISSET(fd, PrevWriteEvent);
sr = FD_ISSET(fd, StaticReadEvent);
sw = FD_ISSET(fd, StaticWriteEvent);
#endif
if (!((sr^pr) | (sw^pw)))
continue;
@ -234,14 +234,14 @@ int epoll_loop(int action)
for (count = 0; count < status; count++) {
fd = epoll_events[count].data.fd;
if (MY_FD_ISSET(fd, StaticReadEvent)) {
if (FD_ISSET(fd, StaticReadEvent)) {
if (fdtab[fd].state == FD_STCLOSE)
continue;
if (epoll_events[count].events & ( EPOLLIN | EPOLLERR | EPOLLHUP ))
fdtab[fd].cb[DIR_RD].f(fd);
}
if (MY_FD_ISSET(fd, StaticWriteEvent)) {
if (FD_ISSET(fd, StaticWriteEvent)) {
if (fdtab[fd].state == FD_STCLOSE)
continue;
if (epoll_events[count].events & ( EPOLLOUT | EPOLLERR | EPOLLHUP ))
@ -317,12 +317,12 @@ int poll_loop(int action)
sr = (rn >> count) & 1;
sw = (wn >> count) & 1;
#else
sr = MY_FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&rn);
sw = MY_FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&wn);
sr = FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&rn);
sw = FD_ISSET(fd&((1<<INTBITS)-1), (typeof(fd_set*))&wn);
#endif
#else
sr = MY_FD_ISSET(fd, StaticReadEvent);
sw = MY_FD_ISSET(fd, StaticWriteEvent);
sr = FD_ISSET(fd, StaticReadEvent);
sw = FD_ISSET(fd, StaticWriteEvent);
#endif
if ((sr|sw)) {
poll_events[nbfd].fd = fd;
@ -346,14 +346,14 @@ int poll_loop(int action)
/* ok, we found one active fd */
status--;
if (MY_FD_ISSET(fd, StaticReadEvent)) {
if (FD_ISSET(fd, StaticReadEvent)) {
if (fdtab[fd].state == FD_STCLOSE)
continue;
if (poll_events[count].revents & ( POLLIN | POLLERR | POLLHUP ))
fdtab[fd].cb[DIR_RD].f(fd);
}
if (MY_FD_ISSET(fd, StaticWriteEvent)) {
if (FD_ISSET(fd, StaticWriteEvent)) {
if (fdtab[fd].state == FD_STCLOSE)
continue;
if (poll_events[count].revents & ( POLLOUT | POLLERR | POLLHUP ))
@ -433,9 +433,9 @@ int select_loop(int action)
// /* just a verification code, needs to be removed for performance */
// for (i=0; i<maxfd; i++) {
// if (MY_FD_ISSET(i, ReadEvent) != MY_FD_ISSET(i, StaticReadEvent))
// if (FD_ISSET(i, ReadEvent) != FD_ISSET(i, StaticReadEvent))
// abort();
// if (MY_FD_ISSET(i, WriteEvent) != MY_FD_ISSET(i, StaticWriteEvent))
// if (FD_ISSET(i, WriteEvent) != FD_ISSET(i, StaticWriteEvent))
// abort();
//
// }
@ -464,13 +464,13 @@ int select_loop(int action)
/* if we specify read first, the accepts and zero reads will be
* seen first. Moreover, system buffers will be flushed faster.
*/
if (MY_FD_ISSET(fd, ReadEvent)) {
if (FD_ISSET(fd, ReadEvent)) {
if (fdtab[fd].state == FD_STCLOSE)
continue;
fdtab[fd].cb[DIR_RD].f(fd);
}
if (MY_FD_ISSET(fd, WriteEvent)) {
if (FD_ISSET(fd, WriteEvent)) {
if (fdtab[fd].state == FD_STCLOSE)
continue;
fdtab[fd].cb[DIR_WR].f(fd);