summaryrefslogtreecommitdiff
path: root/include/ap_mpm.h
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2020-07-02 15:06:23 +0000
committerYann Ylavic <ylavic@apache.org>2020-07-02 15:06:23 +0000
commitec2c547006f24a11a5c3449c12c5e05c363e62f8 (patch)
tree151ca8434b195ea2d12b5984be37e1668d6ea026 /include/ap_mpm.h
parented690c4a87428f40c922c6d0d09ebef90b49bf35 (diff)
downloadhttpd-ec2c547006f24a11a5c3449c12c5e05c363e62f8.tar.gz
mpm_common: add pool argument to mpm_register_poll_callback[_timeout] hooks.
This is cleaner API than using pfds->pool implicitely. MAJOR bump but reusing the existing hooks (with an API/ABI breakage) because it's trunk material only. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879449 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/ap_mpm.h')
-rw-r--r--include/ap_mpm.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/ap_mpm.h b/include/ap_mpm.h
index f446587836..a5e2ce1062 100644
--- a/include/ap_mpm.h
+++ b/include/ap_mpm.h
@@ -210,6 +210,7 @@ AP_DECLARE(apr_status_t) ap_mpm_register_timed_callback(
/**
* Register a callback on the readability or writability on a group of
* sockets/pipes.
+ * @param p Pool used by the MPM for its internal allocations
* @param pfds Array of apr_pollfd_t
* @param cbfn The callback function
* @param baton userdata for the callback function
@@ -217,14 +218,19 @@ AP_DECLARE(apr_status_t) ap_mpm_register_timed_callback(
* APR_ENOTIMPL if no asynch support, or an apr_pollset_add error.
* @remark When activity is found on any 1 socket/pipe in the list, all are removed
* from the pollset and only 1 callback is issued.
+ * @remark The passed in pool can be cleared by cbfn and tofn when called back,
+ * it retains no MPM persistent data and won't be used until the next call
+ * to ap_mpm_register_poll_callback[_timeout].
*/
-AP_DECLARE(apr_status_t) ap_mpm_register_poll_callback(apr_array_header_t *pfds,
+AP_DECLARE(apr_status_t) ap_mpm_register_poll_callback(
+ apr_pool_t *p, apr_array_header_t *pfds,
ap_mpm_callback_fn_t *cbfn, void *baton);
/**
* Register a callback on the readability or writability on a group of sockets/pipes,
* with a timeout.
+ * @param p Pool used by the MPM for its internal allocations
* @param pfds Array of apr_pollfd_t
* @param cbfn The callback function
* @param tofn The callback function if the timeout expires
@@ -235,11 +241,15 @@ AP_DECLARE(apr_status_t) ap_mpm_register_poll_callback(apr_array_header_t *pfds,
* @remark When activity is found on any 1 socket/pipe in the list, all are removed
* from the pollset and only 1 callback is issued.
* @remark For each call, only one of tofn or cbfn will be called, never both.
+ * @remark The passed in pool can be cleared by cbfn and tofn when called back,
+ * it retains no MPM persistent data and won't be used until the next call
+ * to ap_mpm_register_poll_callback[_timeout].
*/
AP_DECLARE(apr_status_t) ap_mpm_register_poll_callback_timeout(
- apr_array_header_t *pfds, ap_mpm_callback_fn_t *cbfn,
- ap_mpm_callback_fn_t *tofn, void *baton, apr_time_t timeout);
+ apr_pool_t *p, apr_array_header_t *pfds,
+ ap_mpm_callback_fn_t *cbfn, ap_mpm_callback_fn_t *tofn,
+ void *baton, apr_time_t timeout);
typedef enum mpm_child_status {