diff --git a/src/aprsc.c b/src/aprsc.c index 79cff6e..4019e01 100644 --- a/src/aprsc.c +++ b/src/aprsc.c @@ -854,7 +854,8 @@ int main(int argc, char **argv) if (have_low_ports) hlog(LOG_INFO, "POSIX capabilities available: can bind low ports"); - hlog(LOG_INFO, "After configuration FileLimit is %d, MaxClients is %d", fileno_limit, maxclients); + hlog(LOG_INFO, "After configuration FileLimit is %d, MaxClients is %d, xpoll using %s", + fileno_limit, maxclients, xpoll_implementation); /* validate maxclients vs fileno_limit, now when it's determined */ if (fileno_limit < maxclients + 50) { diff --git a/src/xpoll.c b/src/xpoll.c index be25983..5812e35 100644 --- a/src/xpoll.c +++ b/src/xpoll.c @@ -28,6 +28,13 @@ #include "hlog.h" #include "cellmalloc.h" +#ifdef XP_USE_EPOLL +const char xpoll_implementation[] = "epoll"; +#endif +#ifdef XP_USE_POLL +const char xpoll_implementation[] = "poll"; +#endif + #ifndef _FOR_VALGRIND_ cellarena_t *xpoll_fd_pool; #endif @@ -50,7 +57,7 @@ struct xpoll_t *xpoll_initialize(struct xpoll_t *xp, void *tp, int (*handler) (s xp->handler = handler; #ifdef XP_USE_EPOLL - hlog(LOG_DEBUG, "xpoll: initializing %p using epoll()", (void *)xp); + //hlog(LOG_DEBUG, "xpoll: initializing %p using epoll()", (void *)xp); xp->epollfd = epoll_create(1000); if (xp->epollfd < 0) { hlog(LOG_CRIT, "xpoll: epoll_create failed: %s", strerror(errno)); @@ -59,7 +66,7 @@ struct xpoll_t *xpoll_initialize(struct xpoll_t *xp, void *tp, int (*handler) (s fcntl(xp->epollfd, F_SETFL, FD_CLOEXEC); #else #ifdef XP_USE_POLL - hlog(LOG_DEBUG, "xpoll: initializing %p using poll()", (void *)xp); + //hlog(LOG_DEBUG, "xpoll: initializing %p using poll()", (void *)xp); xp->pollfd_len = XP_INCREMENT; xp->pollfd = hmalloc(sizeof(struct pollfd) * xp->pollfd_len); #endif diff --git a/src/xpoll.h b/src/xpoll.h index 25df75d..0d5ab52 100644 --- a/src/xpoll.h +++ b/src/xpoll.h @@ -78,4 +78,6 @@ extern void xpoll_outgoing(struct xpoll_t *xp, struct xpoll_fd_t *xfd, int have_ extern int xpoll(struct xpoll_t *xp, int timeout); extern void xpoll_init(void); +extern const char xpoll_implementation[]; + #endif