[MINOR] turn every FD_* into functions
On recent CPUs, functions are about twice as fast as inline FD_*, so
there is now a #define CONFIG_HAP_INLINE_FD_SET to choose between the
two modes.
diff --git a/src/backend.c b/src/backend.c
index d0c0891..2884ea5 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -432,11 +432,11 @@
fdtab[fd].cb[DIR_WR].f = &stream_sock_write;
fdtab[fd].cb[DIR_WR].b = s->req;
- FD_SET(fd, StaticWriteEvent); /* for connect status */
+ MY_FD_SET(fd, StaticWriteEvent); /* for connect status */
#if defined(DEBUG_FULL) && defined(ENABLE_EPOLL)
if (PrevReadEvent) {
- assert(!(FD_ISSET(fd, PrevReadEvent)));
- assert(!(FD_ISSET(fd, PrevWriteEvent)));
+ assert(!(MY_FD_ISSET(fd, PrevReadEvent)));
+ assert(!(MY_FD_ISSET(fd, PrevWriteEvent)));
}
#endif