apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject svn commit: r1325944 - in /apr/apr/trunk: configure.in include/apr_poll.h include/arch/unix/apr_arch_poll_private.h poll/unix/pollset.c poll/unix/z_asio.c
Date Fri, 13 Apr 2012 20:54:35 GMT
Author: gregames
Date: Fri Apr 13 20:54:35 2012
New Revision: 1325944

URL: http://svn.apache.org/viewvc?rev=1325944&view=rev
Log:
z/OS "threadsafe" apr_pollset_poll depends on async i/o feeding an
IPC message queue.  Create a configure test for that combo and test it 
elsewhere.

Modified:
    apr/apr/trunk/configure.in
    apr/apr/trunk/include/apr_poll.h
    apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h
    apr/apr/trunk/poll/unix/pollset.c
    apr/apr/trunk/poll/unix/z_asio.c

Modified: apr/apr/trunk/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/configure.in?rev=1325944&r1=1325943&r2=1325944&view=diff
==============================================================================
--- apr/apr/trunk/configure.in (original)
+++ apr/apr/trunk/configure.in Fri Apr 13 20:54:35 2012
@@ -885,6 +885,25 @@ if test "$apr_cv_epoll_create1" = "yes";
    AC_DEFINE([HAVE_EPOLL_CREATE1], 1, [Define if epoll_create1 function is supported])
 fi
 
+# Check for z/OS async i/o support.  
+AC_CACHE_CHECK([for asio -> message queue support], [apr_cv_aio_msgq],
+[AC_TRY_RUN([
+#define _AIO_OS390
+#include <aio.h>
+
+int main()
+{
+    struct aiocb a;
+
+    a.aio_notifytype = AIO_MSGQ;  /* use IPC message queue for notification */
+
+    return aio_cancel(2, NULL) == -1;
+}], [apr_cv_aio_msgq=yes], [apr_cv_aio_msgq=no], [apr_cv_aio_msgq=no])])
+
+if test "$apr_cv_aio_msgq" = "yes"; then
+   AC_DEFINE([HAVE_AIO_MSGQ], 1, [Define if async i/o supports message q's])
+fi
+
 # test for dup3
 AC_CACHE_CHECK([for dup3 support], [apr_cv_dup3],
 [AC_TRY_RUN([

Modified: apr/apr/trunk/include/apr_poll.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_poll.h?rev=1325944&r1=1325943&r2=1325944&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_poll.h (original)
+++ apr/apr/trunk/include/apr_poll.h Fri Apr 13 20:54:35 2012
@@ -77,7 +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_AIO_MSGQ,       /**< Poll uses z/OS asio method */
     APR_POLLSET_POLL            /**< Poll uses poll method */
 } apr_pollset_method_e;
 

Modified: apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h?rev=1325944&r1=1325943&r2=1325944&view=diff
==============================================================================
--- apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h (original)
+++ apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h Fri Apr 13 20:54:35 2012
@@ -45,9 +45,9 @@
 #define HAS_PIPES(dt) (dt == APR_POLL_FILE) ? 1 : 0
 #endif
 
-#if defined(HAVE_AIO_H) && defined(__MVS__)
-#define _AIO_OS390     /* enable a bunch of z/OS aio.h definitions */
-#include <aio.h>       /* aiocb        */
+#if defined(HAVE_AIO_H) && defined(HAVE_AIO_MSGQ)
+#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 */
@@ -60,9 +60,9 @@
 #elif defined(HAVE_EPOLL)
 #define POLLSET_USES_EPOLL
 #define POLLSET_DEFAULT_METHOD APR_POLLSET_EPOLL
-#elif defined(HAVE_AIO_H) && defined(__MVS__)
-#define POLLSET_USES_ASIO
-#define POLLSET_DEFAULT_METHOD APR_POLLSET_ASIO
+#elif defined(HAVE_AIO_MSGQ)
+#define POLLSET_USES_AIO_MSGQ
+#define POLLSET_DEFAULT_METHOD APR_POLLSET_AIO_MSGQ
 #elif defined(HAVE_POLL)
 #define POLLSET_USES_POLL
 #define POLLSET_DEFAULT_METHOD APR_POLLSET_POLL
@@ -83,7 +83,7 @@
 #endif
 #endif
 
-#if defined(POLLSET_USES_KQUEUE) || defined(POLLSET_USES_EPOLL) || defined(POLLSET_USES_PORT)
|| defined(POLLSET_USES_ASIO)
+#if defined(POLLSET_USES_KQUEUE) || defined(POLLSET_USES_EPOLL) || defined(POLLSET_USES_PORT)
|| defined(POLLSET_USES_AIO_MSGQ)
 
 #include "apr_ring.h"
 
@@ -115,6 +115,7 @@ struct pfd_elem_t {
 typedef struct apr_pollset_private_t apr_pollset_private_t;
 typedef struct apr_pollset_provider_t apr_pollset_provider_t;
 typedef struct apr_pollcb_provider_t apr_pollcb_provider_t;
+
 struct apr_pollset_t
 {
     apr_pool_t *pool;

Modified: apr/apr/trunk/poll/unix/pollset.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/pollset.c?rev=1325944&r1=1325943&r2=1325944&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/pollset.c (original)
+++ apr/apr/trunk/poll/unix/pollset.c Fri Apr 13 20:54:35 2012
@@ -52,8 +52,8 @@ extern apr_pollset_provider_t *apr_polls
 #if defined(HAVE_EPOLL)
 extern apr_pollset_provider_t *apr_pollset_provider_epoll;
 #endif
-#if defined(HAVE_AIO_H) && defined(__MVS__)
-extern apr_pollset_provider_t *apr_pollset_provider_asio;
+#if defined(HAVE_AIO_MSGQ)
+extern apr_pollset_provider_t *apr_pollset_provider_aio_msgq;
 #endif
 #if defined(HAVE_POLL)
 extern apr_pollset_provider_t *apr_pollset_provider_poll;
@@ -79,9 +79,9 @@ static apr_pollset_provider_t *pollset_p
             provider = apr_pollset_provider_epoll;
 #endif
         break;
-        case APR_POLLSET_ASIO:
-#if defined(HAVE_AIO_H) && defined(__MVS__)
-            provider = apr_pollset_provider_asio;
+        case APR_POLLSET_AIO_MSGQ:
+#if defined(HAVE_AIO_MSGQ)
+            provider = apr_pollset_provider_aio_msgq;
 #endif
         break;
         case APR_POLLSET_POLL:

Modified: apr/apr/trunk/poll/unix/z_asio.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/z_asio.c?rev=1325944&r1=1325943&r2=1325944&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/z_asio.c (original)
+++ apr/apr/trunk/poll/unix/z_asio.c Fri Apr 13 20:54:35 2012
@@ -41,7 +41,7 @@
 #include "apr_arch_networkio.h"
 #include "apr_arch_poll_private.h"
 
-#if defined(HAVE_AIO_H) && defined(__MVS__)
+#ifdef HAVE_AIO_MSGQ
 
 #include <sys/msg.h>  	/* msgget etc   */
 #include <time.h>     	/* timestruct   */
@@ -736,6 +736,6 @@ static apr_pollset_provider_t impl = {
     "asio"
 };  
 
-apr_pollset_provider_t *apr_pollset_provider_asio = &impl;
+apr_pollset_provider_t *apr_pollset_provider_aio_msgq = &impl;
 
-#endif /* HAVE_ASIO && __MVS__ */
+#endif /* HAVE_AIO_MSGQ */



Mime
View raw message