Permalink
Browse files

support for thread-hopping apr_pollset_* using z/OS async i/o.

no support for apr_pollcb yet.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1308910 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 5e28471 commit b83a2aacc9fb541c8a94b476e6fb84614bd4f95d Greg Ames committed Apr 3, 2012
Showing with 761 additions and 1 deletion.
  1. +2 −0 configure.in
  2. +1 −0 include/apr_poll.h
  3. +9 −1 include/arch/unix/apr_arch_poll_private.h
  4. +8 −0 poll/unix/pollset.c
  5. +741 −0 poll/unix/z_asio.c
View
@@ -1271,6 +1271,7 @@ dnl ----------------------------- Checks for Any required Headers
AC_HEADER_STDC
APR_FLAG_HEADERS(
+ aio.h \
ByteOrder.h \
conio.h \
crypt.h \
@@ -1368,6 +1369,7 @@ else
netinet_tcph=0
fi
+AC_SUBST(aioh)
AC_SUBST(arpa_ineth)
AC_SUBST(conioh)
AC_SUBST(ctypeh)
View
@@ -77,6 +77,7 @@ typedef enum {
APR_POLLSET_KQUEUE, /**< Poll uses kqueue method */
APR_POLLSET_PORT, /**< Poll uses Solaris event port method */
APR_POLLSET_EPOLL, /**< Poll uses epoll method */
+ APR_POLLSET_ASIO, /**< Poll uses z/OS async i/o method */
APR_POLLSET_POLL /**< Poll uses poll method */
} apr_pollset_method_e;
@@ -45,6 +45,11 @@
#define HAS_PIPES(dt) (dt == APR_POLL_FILE) ? 1 : 0
#endif
+#ifdef HAVE_AIO_H
+#define _AIO_OS390 /* enable a bunch of z/OS aio.h definitions */
+#include <aio.h> /* aiocb */
+#endif
+
/* Choose the best method platform specific to use in apr_pollset */
#ifdef HAVE_KQUEUE
#define POLLSET_USES_KQUEUE
@@ -55,6 +60,9 @@
#elif defined(HAVE_EPOLL)
#define POLLSET_USES_EPOLL
#define POLLSET_DEFAULT_METHOD APR_POLLSET_EPOLL
+#elif defined(HAVE_AIO_H)
+#define POLLSET_USES_ASIO
+#define POLLSET_DEFAULT_METHOD APR_POLLSET_ASIO
#elif defined(HAVE_POLL)
#define POLLSET_USES_POLL
#define POLLSET_DEFAULT_METHOD APR_POLLSET_POLL
@@ -75,7 +83,7 @@
#endif
#endif
-#if defined(POLLSET_USES_KQUEUE) || defined(POLLSET_USES_EPOLL) || defined(POLLSET_USES_PORT)
+#if defined(POLLSET_USES_KQUEUE) || defined(POLLSET_USES_EPOLL) || defined(POLLSET_USES_PORT) || defined(POLLSET_USES_ASIO)
#include "apr_ring.h"
View
@@ -52,6 +52,9 @@ extern apr_pollset_provider_t *apr_pollset_provider_port;
#if defined(HAVE_EPOLL)
extern apr_pollset_provider_t *apr_pollset_provider_epoll;
#endif
+#if defined(HAVE_AIO_H)
+extern apr_pollset_provider_t *apr_pollset_provider_asio;
+#endif
#if defined(HAVE_POLL)
extern apr_pollset_provider_t *apr_pollset_provider_poll;
#endif
@@ -76,6 +79,11 @@ static apr_pollset_provider_t *pollset_provider(apr_pollset_method_e method)
provider = apr_pollset_provider_epoll;
#endif
break;
+ case APR_POLLSET_ASIO:
+#if defined(HAVE_AIO_H)
+ provider = apr_pollset_provider_asio;
+#endif
+ break;
case APR_POLLSET_POLL:
#if defined(HAVE_POLL)
provider = apr_pollset_provider_poll;
Oops, something went wrong.

0 comments on commit b83a2aa

Please sign in to comment.