event: implement PollGroup based on Windows select

This commit is contained in:
Denis Krjuchkov
2013-11-29 14:38:48 +06:00
parent b9035d3e0a
commit cfdd5edc49
6 changed files with 343 additions and 3 deletions

View File

@@ -170,13 +170,15 @@ AC_ARG_WITH(eventloop,
AC_ARG_WITH(pollmethod,
AS_HELP_STRING(
[--with-pollmethod=@<:@epoll|auto@:>@],
[--with-pollmethod=@<:@epoll|winselect|auto@:>@],
[specify poll method for internal event loop (default=auto)]),,
[with_pollmethod=auto])
if test "x$with_eventloop" = xauto; then
if test "x$enable_epoll" = xyes; then
with_eventloop=internal
if
test "x$enable_epoll" = xyes ||
test "x$host_is_windows" = xyes; then
with_eventloop=internal
else
with_eventloop=glib
fi
@@ -200,6 +202,8 @@ if test "x$with_eventloop" = xinternal; then
if test "x$with_pollmethod" = xauto; then
if test "x$enable_epoll" = xyes; then
with_pollmethod=epoll
elif test "x$host_is_windows" = xyes; then
with_pollmethod=winselect
else
AC_MSG_ERROR([no poll method is available for your platform])
fi
@@ -208,6 +212,10 @@ if test "x$with_eventloop" = xinternal; then
epoll)
AC_DEFINE(USE_EPOLL, 1, [Define to poll sockets with epoll])
;;
winselect)
AC_DEFINE(USE_WINSELECT, 1,
[Define to poll sockets with Windows select])
;;
*)
AC_MSG_ERROR([unknown pollmethod option: $with_pollmethod])
esac