From: Yann Ylavic Date: Wed, 2 Feb 2022 10:18:41 +0000 (+0000) Subject: core: Follow up to r1897240: Provide/export ap_thread_current_create() X-Git-Tag: 2.5.0-alpha2-ci-test-only~520 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ba426a54895ab1bb3f03a7fe4489420ef9195485;p=thirdparty%2Fapache%2Fhttpd.git core: Follow up to r1897240: Provide/export ap_thread_current_create() For completness, and possibly to ease backport to 2.4.x for MPM winnt. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897691 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/httpd.h b/include/httpd.h index 86456d4afd9..b8f6119329a 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -2579,6 +2579,7 @@ AP_DECLARE(void *) ap_realloc(void *ptr, size_t size) #endif #define ap_thread_create apr_thread_create #define ap_thread_current apr_thread_current +#define ap_thread_current_create apr_thread_current_create #define ap_thread_current_after_fork apr_thread_current_after_fork #else /* APR_VERSION_AT_LEAST(1,8,0) && !defined(AP_NO_THREAD_LOCAL) */ @@ -2609,6 +2610,9 @@ AP_DECLARE(apr_status_t) ap_thread_create(apr_thread_t **thread, void *data, apr_pool_t *pool); #endif /* AP_THREAD_LOCAL */ +AP_DECLARE(apr_status_t) ap_thread_current_create(apr_thread_t **current, + apr_threadattr_t *attr, + apr_pool_t *pool) AP_DECLARE(void) ap_thread_current_after_fork(void); AP_DECLARE(apr_thread_t *) ap_thread_current(void); diff --git a/server/util.c b/server/util.c index 7c2fa87cfd8..2018396e5a2 100644 --- a/server/util.c +++ b/server/util.c @@ -3300,9 +3300,9 @@ AP_DECLARE(apr_status_t) ap_thread_create(apr_thread_t **thread, #endif /* AP_HAS_THREAD_LOCAL */ -static apr_status_t ap_thread_current_create(apr_thread_t **current, - apr_threadattr_t *attr, - apr_pool_t *pool) +AP_DECLARE(apr_status_t) ap_thread_current_create(apr_thread_t **current, + apr_threadattr_t *attr, + apr_pool_t *pool) { apr_status_t rv; apr_abortfunc_t abort_fn = apr_pool_abort_get(pool);