jim wrote:
Matt,
What configures libevent to use one event mechanism from other? e.g.
epoll vs poll vs kqueue
How is this(event mechanism to be used) configured in libevent and when
(build time or run time)?
Any relavant docs about this will be helpful.
There is a number of environment variables you may push to disable
various methods:
devpoll.c: if (getenv("EVENT_NODEVPOLL"))
epoll.c: if (getenv("EVENT_NOEPOLL"))
event.c: if (getenv("EVENT_SHOW_METHOD"))
evport.c: if (getenv("EVENT_NOEVPORT"))
kqueue.c: if (getenv("EVENT_NOKQUEUE"))
poll.c: if (getenv("EVENT_NOPOLL"))
select.c: if (getenv("EVENT_NOSELECT"))
The order it tries them is:
static const struct eventop *eventops[] = {
#ifdef HAVE_EVENT_PORTS
&evportops,
#endif
#ifdef HAVE_WORKING_KQUEUE
&kqops,
#endif
#ifdef HAVE_EPOLL
&epollops,
#endif
#ifdef HAVE_DEVPOLL
&devpollops,
#endif
#ifdef HAVE_POLL
&pollops,
#endif
#ifdef HAVE_SELECT
&selectops,
#endif
#ifdef WIN32
&win32ops,
#endif
NULL
};
Cheers,
Trond