]> granicus.if.org Git - apache/commitdiff
r1494157 from eventopt for event, per sf's review comments.
authorEric Covener <covener@apache.org>
Sun, 20 Apr 2014 17:53:38 +0000 (17:53 +0000)
committerEric Covener <covener@apache.org>
Sun, 20 Apr 2014 17:53:38 +0000 (17:53 +0000)
use a subpool of pchild since skiplist allocations will
happen across threads and are only protected from
other skiplist operations.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588806 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/event/event.c

index be90c7df307c7aebed0636f04cf9b93471784903..29c261c1d437298130345882e982fda79da4c077 100644 (file)
@@ -2345,6 +2345,7 @@ static void child_main(int child_num_arg)
     thread_starter *ts;
     apr_threadattr_t *thread_attr;
     apr_thread_t *start_thread_id;
+    apr_pool_t *pskip;
 
     mpm_state = AP_MPMQ_STARTING;       /* for benefit of any hooks that run as this
                                          * child initializes
@@ -2362,7 +2363,8 @@ static void child_main(int child_num_arg)
 
     apr_thread_mutex_create(&g_timer_skiplist_mtx, APR_THREAD_MUTEX_DEFAULT, pchild);
     APR_RING_INIT(&timer_free_ring, timer_event_t, link);
-    apr_skiplist_init(&timer_skiplist, pchild);
+    apr_pool_create(&pskip, pchild);
+    apr_skiplist_init(&timer_skiplist, pskip);
     apr_skiplist_set_compare(timer_skiplist, indexing_comp, indexing_compk);
     ap_run_child_init(pchild, ap_server_conf);