apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1534274 - in /apr/apr/branches/1.5.x: ./ CHANGES configure.in include/apr_poll.h include/arch/unix/apr_arch_poll_private.h poll/unix/pollcb.c poll/unix/pollset.c poll/unix/z_asio.c
Date Mon, 21 Oct 2013 16:36:24 GMT
Author: covener
Date: Mon Oct 21 16:36:24 2013
New Revision: 1534274

URL: http://svn.apache.org/r1534274
Log:
backport APR_POLLSET_THREADSAFE pollset support for z/OS.
some doxygen updates


Added:
    apr/apr/branches/1.5.x/poll/unix/z_asio.c   (props changed)
      - copied unchanged from r1534268, apr/apr/trunk/poll/unix/z_asio.c
Modified:
    apr/apr/branches/1.5.x/   (props changed)
    apr/apr/branches/1.5.x/CHANGES
    apr/apr/branches/1.5.x/configure.in
    apr/apr/branches/1.5.x/include/apr_poll.h
    apr/apr/branches/1.5.x/include/arch/unix/apr_arch_poll_private.h
    apr/apr/branches/1.5.x/poll/unix/pollcb.c
    apr/apr/branches/1.5.x/poll/unix/pollset.c

Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r888669

Modified: apr/apr/branches/1.5.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/CHANGES?rev=1534274&r1=1534273&r2=1534274&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.5.x/CHANGES [utf-8] Mon Oct 21 16:36:24 2013
@@ -1,6 +1,8 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 1.5.0
 
+  *) z/OS: threadsafe apr_pollset_poll support for sockets [Greg Ames]
+
   *) Windows:  Don't obtain a mutex for buffered file I/O unless the
      file was opened with the APR_FOPEN_XTHREAD flag.  [Ivan Zhakov
      <ivan visualsvn.com>]

Modified: apr/apr/branches/1.5.x/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/configure.in?rev=1534274&r1=1534273&r2=1534274&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/configure.in (original)
+++ apr/apr/branches/1.5.x/configure.in Mon Oct 21 16:36:24 2013
@@ -998,6 +998,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/branches/1.5.x/include/apr_poll.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/include/apr_poll.h?rev=1534274&r1=1534273&r2=1534274&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/include/apr_poll.h (original)
+++ apr/apr/branches/1.5.x/include/apr_poll.h Mon Oct 21 16:36:24 2013
@@ -77,7 +77,8 @@ 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_POLL            /**< Poll uses poll method */
+    APR_POLLSET_POLL,           /**< Poll uses poll method */
+    APR_POLLSET_AIO_MSGQ        /**< Poll uses z/OS asio method */
 } apr_pollset_method_e;
 
 /** Used in apr_pollfd_t to determine what the apr_descriptor is */
@@ -131,7 +132,7 @@ typedef struct apr_pollset_t apr_pollset
  * @remark If flags contains APR_POLLSET_WAKEABLE, then a pollset is
  *         created with an additional internal pipe object used for the
  *         apr_pollset_wakeup() call. The actual size of pollset is
- *         in that case size + 1. This feature is only supported on some
+ *         in that case @a size + 1. This feature is only supported on some
  *         platforms; the apr_pollset_create() call will fail with
  *         APR_ENOTIMPL on platforms where it is not supported.
  * @remark If flags contains APR_POLLSET_NOCOPY, then the apr_pollfd_t
@@ -226,6 +227,7 @@ APR_DECLARE(apr_status_t) apr_pollset_ad
  * Remove a descriptor from a pollset
  * @param pollset The pollset from which to remove the descriptor
  * @param descriptor The descriptor to remove
+ * @remark If the descriptor is not found, APR_NOTFOUND is returned.
  * @remark If the pollset has been created with APR_POLLSET_THREADSAFE
  *         and thread T1 is blocked in a call to apr_pollset_poll() for
  *         this same pollset that is being modified via apr_pollset_remove()
@@ -305,7 +307,7 @@ APR_DECLARE(const char *) apr_pollset_me
  */
 APR_DECLARE(const char *) apr_poll_method_defname(void);
 
-/** Opaque structure used for pollset API */
+/** Opaque structure used for pollcb API */
 typedef struct apr_pollcb_t apr_pollcb_t;
 
 /**

Modified: apr/apr/branches/1.5.x/include/arch/unix/apr_arch_poll_private.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/include/arch/unix/apr_arch_poll_private.h?rev=1534274&r1=1534273&r2=1534274&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/include/arch/unix/apr_arch_poll_private.h (original)
+++ apr/apr/branches/1.5.x/include/arch/unix/apr_arch_poll_private.h Mon Oct 21 16:36:24 2013
@@ -45,6 +45,11 @@
 #define HAS_PIPES(dt) (dt == APR_POLL_FILE) ? 1 : 0
 #endif
 
+#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 */
 #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_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
@@ -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_AIO_MSGQ)
 
 #include "apr_ring.h"
 
@@ -107,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/branches/1.5.x/poll/unix/pollcb.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/poll/unix/pollcb.c?rev=1534274&r1=1534273&r2=1534274&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/poll/unix/pollcb.c (original)
+++ apr/apr/branches/1.5.x/poll/unix/pollcb.c Mon Oct 21 16:36:24 2013
@@ -66,6 +66,7 @@ static apr_pollcb_provider_t *pollcb_pro
 #endif
         break;
         case APR_POLLSET_SELECT:
+        case APR_POLLSET_AIO_MSGQ:
         case APR_POLLSET_DEFAULT:
         break;
     }

Modified: apr/apr/branches/1.5.x/poll/unix/pollset.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/poll/unix/pollset.c?rev=1534274&r1=1534273&r2=1534274&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/poll/unix/pollset.c (original)
+++ apr/apr/branches/1.5.x/poll/unix/pollset.c Mon Oct 21 16:36:24 2013
@@ -163,6 +163,9 @@ 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_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;
 #endif
@@ -187,6 +190,11 @@ static apr_pollset_provider_t *pollset_p
             provider = apr_pollset_provider_epoll;
 #endif
         break;
+        case APR_POLLSET_AIO_MSGQ:
+#if defined(HAVE_AIO_MSGQ)
+            provider = apr_pollset_provider_aio_msgq;
+#endif
+        break;
         case APR_POLLSET_POLL:
 #if defined(HAVE_POLL)
             provider = apr_pollset_provider_poll;

Propchange: apr/apr/branches/1.5.x/poll/unix/z_asio.c
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Oct 21 16:36:24 2013
@@ -0,0 +1,3 @@
+/apr/apr/branches/1.4.x/poll/unix/z_asio.c:1101301
+/apr/apr/branches/1.5.x/poll/unix/z_asio.c:1101302
+/apr/apr-util/branches/1.4.x/poll/unix/z_asio.c:1211219,1211223



Mime
View raw message