Commit 798940a4 authored by Yann Ylavic's avatar Yann Ylavic
Browse files

event, worker: follow up to r1835845, r1837354: pruntime is global now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837356 13f79535-47bb-0310-9956-ffa450edef68
parent 5f99a13e
Loading
Loading
Loading
Loading
+3 −3
Changes for server/mpm/event/event.c: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -2408,7 +2408,7 @@ static int check_signal(int signum)
    return 0;
}

static void create_listener_thread(thread_starter * ts, apr_pool_t *pool)
static void create_listener_thread(thread_starter * ts)
{
    int my_child_num = ts->child_num_arg;
    apr_threadattr_t *thread_attr = ts->threadattr;
@@ -2419,7 +2419,7 @@ static void create_listener_thread(thread_starter * ts, apr_pool_t *pool)
    my_info->pslot = my_child_num;
    my_info->tslot = -1;      /* listener thread doesn't have a thread slot */
    rv = apr_thread_create(&ts->listener, thread_attr, listener_thread,
                           my_info, pool);
                           my_info, pruntime);
    if (rv != APR_SUCCESS) {
        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, APLOGNO(00474)
                     "apr_thread_create: unable to create listener thread");
@@ -2627,7 +2627,7 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy)

        /* Start the listener only when there are workers available */
        if (!listener_started && threads_created) {
            create_listener_thread(ts, pruntime);
            create_listener_thread(ts);
            listener_started = 1;
        }

+3 −3
Changes for server/mpm/worker/worker.c: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -835,7 +835,7 @@ static int check_signal(int signum)
    return 0;
}

static void create_listener_thread(thread_starter *ts, apr_pool_t *pool)
static void create_listener_thread(thread_starter *ts)
{
    int my_child_num = ts->child_num_arg;
    apr_threadattr_t *thread_attr = ts->threadattr;
@@ -847,7 +847,7 @@ static void create_listener_thread(thread_starter *ts, apr_pool_t *pool)
    my_info->tid = -1; /* listener thread doesn't have a thread slot */
    my_info->sd = 0;
    rv = apr_thread_create(&ts->listener, thread_attr, listener_thread,
                           my_info, pool);
                           my_info, pruntime);
    if (rv != APR_SUCCESS) {
        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, APLOGNO(00275)
                     "apr_thread_create: unable to create listener thread");
@@ -978,7 +978,7 @@ static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy)
        }
        /* Start the listener only when there are workers available */
        if (!listener_started && threads_created) {
            create_listener_thread(ts, pruntime);
            create_listener_thread(ts);
            listener_started = 1;
        }
        if (start_thread_may_exit || threads_created == threads_per_child) {