You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2020/07/02 00:33:46 UTC

svn commit: r1879422 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h include/ap_mpm.h include/mpm_common.h server/mpm/event/event.c server/mpm_common.c

Author: ylavic
Date: Thu Jul  2 00:33:46 2020
New Revision: 1879422

URL: http://svn.apache.org/viewvc?rev=1879422&view=rev
Log:
mpm_common: remove ap_mpm_unregister_poll_callback().

It's now called automatically by mpm_event and anyway can't be called safely
outside the MPM code without racing.

MAJOR bump.


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/include/ap_mmn.h
    httpd/httpd/trunk/include/ap_mpm.h
    httpd/httpd/trunk/include/mpm_common.h
    httpd/httpd/trunk/server/mpm/event/event.c
    httpd/httpd/trunk/server/mpm_common.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1879422&r1=1879421&r2=1879422&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Jul  2 00:33:46 2020
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) mpm_common: remove ap_mpm_unregister_poll_callback() and
+     mpm_unregister_poll_callback hook. [Yann Ylavic]
+
   *) mod_proxy_http: add asynchronous handling of Upgrade(d) protocols,
      where idle connections are returned to the MPM and rescheduled on
      another thread when ready. [Yann Ylavic]

Modified: httpd/httpd/trunk/include/ap_mmn.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_mmn.h?rev=1879422&r1=1879421&r2=1879422&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_mmn.h (original)
+++ httpd/httpd/trunk/include/ap_mmn.h Thu Jul  2 00:33:46 2020
@@ -646,14 +646,16 @@
  * 20200420.9 (2.5.1-dev)  Add hooks deliver_report and gather_reports to
  *                         mod_dav.h.
  * 20200420.10 (2.5.1-dev) Add method_precondition hook to mod_dav.h.
+ * 20200701.0 (2.5.1-dev)  Axe ap_mpm_unregister_poll_callback and
+ *                         mpm_unregister_poll_callback hook.
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
 
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20200420
+#define MODULE_MAGIC_NUMBER_MAJOR 20200701
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 10            /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 0             /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a

Modified: httpd/httpd/trunk/include/ap_mpm.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_mpm.h?rev=1879422&r1=1879421&r2=1879422&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_mpm.h (original)
+++ httpd/httpd/trunk/include/ap_mpm.h Thu Jul  2 00:33:46 2020
@@ -242,16 +242,6 @@ AP_DECLARE(apr_status_t) ap_mpm_register
         ap_mpm_callback_fn_t *tofn, void *baton, apr_time_t timeout);
 
 
-/**
-* Unregister a previously registered callback.
-* @param pfds Array of apr_pollfd_t
-* @return APR_SUCCESS if all sockets/pipes could be removed from the pollset,
-* APR_ENOTIMPL if no asynch support, or an apr_pollset_remove error.
-* @remark This function triggers the cleanup registered on the pool p during
-* callback registration.
-*/
-AP_DECLARE(apr_status_t) ap_mpm_unregister_poll_callback(apr_array_header_t *pfds);
-
 typedef enum mpm_child_status {
     MPM_CHILD_STARTED,
     MPM_CHILD_EXITED,

Modified: httpd/httpd/trunk/include/mpm_common.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/mpm_common.h?rev=1879422&r1=1879421&r2=1879422&view=diff
==============================================================================
--- httpd/httpd/trunk/include/mpm_common.h (original)
+++ httpd/httpd/trunk/include/mpm_common.h Thu Jul  2 00:33:46 2020
@@ -440,13 +440,6 @@ AP_DECLARE_HOOK(apr_status_t, mpm_regist
                 void *baton,
                 apr_time_t timeout))
 
-/**
- * Unregister the specified callback
- * @ingroup hooks
- */
-AP_DECLARE_HOOK(apr_status_t, mpm_unregister_poll_callback,
-                (apr_array_header_t *pds))
-
 /** Resume the suspended connection 
  * @ingroup hooks
  */

Modified: httpd/httpd/trunk/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1879422&r1=1879421&r2=1879422&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Thu Jul  2 00:33:46 2020
@@ -1665,10 +1665,6 @@ static apr_status_t event_register_poll_
                                            baton,
                                            0     /* no timeout */);
 }
-static apr_status_t event_unregister_poll_callback(apr_array_header_t *pfds)
-{
-    return apr_pool_cleanup_run(pfds->pool, pfds, event_cleanup_poll_callback);
-}
 
 /*
  * Close socket and clean up if remote closed its end while we were in
@@ -4081,8 +4077,6 @@ static void event_hooks(apr_pool_t * p)
                                         APR_HOOK_MIDDLE);
     ap_hook_mpm_register_poll_callback_timeout(event_register_poll_callback_ex, NULL, NULL,
                                         APR_HOOK_MIDDLE);
-    ap_hook_mpm_unregister_poll_callback(event_unregister_poll_callback, NULL, NULL,
-                                        APR_HOOK_MIDDLE);
     ap_hook_pre_read_request(event_pre_read_request, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_post_read_request(event_post_read_request, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_mpm_get_name(event_get_name, NULL, NULL, APR_HOOK_MIDDLE);

Modified: httpd/httpd/trunk/server/mpm_common.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm_common.c?rev=1879422&r1=1879421&r2=1879422&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm_common.c (original)
+++ httpd/httpd/trunk/server/mpm_common.c Thu Jul  2 00:33:46 2020
@@ -70,7 +70,6 @@
     APR_HOOK_LINK(mpm_register_timed_callback) \
     APR_HOOK_LINK(mpm_register_poll_callback) \
     APR_HOOK_LINK(mpm_register_poll_callback_timeout) \
-    APR_HOOK_LINK(mpm_unregister_poll_callback) \
     APR_HOOK_LINK(mpm_get_name) \
     APR_HOOK_LINK(mpm_resume_suspended) \
     APR_HOOK_LINK(end_generation) \
@@ -116,9 +115,6 @@ AP_IMPLEMENT_HOOK_RUN_FIRST(apr_status_t
 AP_IMPLEMENT_HOOK_RUN_FIRST(apr_status_t, mpm_register_poll_callback_timeout,
                             (apr_array_header_t *pds, ap_mpm_callback_fn_t *cbfn, ap_mpm_callback_fn_t *tofn, void *baton, apr_time_t timeout),
                             (pds, cbfn, tofn, baton, timeout), APR_ENOTIMPL)
-AP_IMPLEMENT_HOOK_RUN_FIRST(apr_status_t, mpm_unregister_poll_callback,
-                            (apr_array_header_t *pds),
-                            (pds), APR_ENOTIMPL)
 AP_IMPLEMENT_HOOK_RUN_FIRST(int, output_pending,
                             (conn_rec *c), (c), DECLINED)
 AP_IMPLEMENT_HOOK_RUN_FIRST(int, input_pending,
@@ -585,12 +581,6 @@ AP_DECLARE(apr_status_t) ap_mpm_register
             timeout);
 }
 
-AP_DECLARE(apr_status_t) ap_mpm_unregister_poll_callback(
-        apr_array_header_t *pfds)
-{
-    return ap_run_mpm_unregister_poll_callback(pfds);
-}
-
 AP_DECLARE(const char *)ap_show_mpm(void)
 {
     const char *name = ap_run_mpm_get_name();