summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2017-02-21 15:33:30 +0100
committerYann Ylavic <ylavic@apache.org>2017-02-21 15:33:30 +0100
commit841802066cecddabc39fe4a3fef2267f1f03de70 (patch)
tree0ed827641b7f1cd268bfd38ac3ecd1ca9953eced /server
parentmpm_worker: no mutex needed at ptrans' allocator level. (diff)
downloadapache2-841802066cecddabc39fe4a3fef2267f1f03de70.tar.xz
apache2-841802066cecddabc39fe4a3fef2267f1f03de70.zip
mpm_event: no mutex needed at ptrans' allocator level.
(reverts r1783761 and r1783755 partially, style changes preserved) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783896 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/mpm/event/event.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c
index d1014002f5..85018aba09 100644
--- a/server/mpm/event/event.c
+++ b/server/mpm/event/event.c
@@ -1941,7 +1941,6 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
}
if (!listeners_disabled) {
void *csd = NULL;
- apr_thread_mutex_t *mutex;
ap_listen_rec *lr = (ap_listen_rec *) pt->baton;
apr_pool_t *ptrans; /* Pool for per-transaction stuff */
ap_pop_pool(&ptrans, worker_queue_info);
@@ -1965,30 +1964,6 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
}
apr_pool_tag(ptrans, "transaction");
- /* We need a mutex in the allocator to synchronize ptrans'
- * children creations/destructions, but this mutex ought to
- * live in ptrans itself to avoid leaks, hence it's cleared
- * in ap_push_pool(). We could recycle some pconf's mutexes
- * like we do for ptrans subpools, but that'd need another
- * synchronization mechanism, whereas creating a pthread
- * mutex (unix here!) is really as simple/fast as a static
- * PTHREAD_MUTEX_INIT assignment, so let's not bother and
- * create the mutex for each ptrans (recycled or not).
- */
- rc = apr_thread_mutex_create(&mutex,
- APR_THREAD_MUTEX_DEFAULT,
- ptrans);
- if (rc != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, rc,
- ap_server_conf, APLOGNO(10003)
- "Failed to create transaction pool mutex");
- ap_push_pool(worker_queue_info, ptrans);
- signal_threads(ST_GRACEFUL);
- return NULL;
- }
- apr_allocator_mutex_set(apr_pool_allocator_get(ptrans),
- mutex);
-
get_worker(&have_idle_worker, 1, &workers_were_busy);
rc = lr->accept_func(&csd, lr, ptrans);