simple_run.c revision f47612d41722d85fe2d698c43316a36fbccd4685
af84459fbf938e508fd10b01cb8d699c79083813takashi/* Licensed to the Apache Software Foundation (ASF) under one or more
af84459fbf938e508fd10b01cb8d699c79083813takashi * contributor license agreements. See the NOTICE file distributed with
af84459fbf938e508fd10b01cb8d699c79083813takashi * this work for additional information regarding copyright ownership.
af84459fbf938e508fd10b01cb8d699c79083813takashi * The ASF licenses this file to You under the Apache License, Version 2.0
af84459fbf938e508fd10b01cb8d699c79083813takashi * (the "License"); you may not use this file except in compliance with
af84459fbf938e508fd10b01cb8d699c79083813takashi * the License. You may obtain a copy of the License at
af84459fbf938e508fd10b01cb8d699c79083813takashi * Unless required by applicable law or agreed to in writing, software
af84459fbf938e508fd10b01cb8d699c79083813takashi * distributed under the License is distributed on an "AS IS" BASIS,
af84459fbf938e508fd10b01cb8d699c79083813takashi * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
af84459fbf938e508fd10b01cb8d699c79083813takashi * See the License for the specific language governing permissions and
af84459fbf938e508fd10b01cb8d699c79083813takashi * limitations under the License.
af84459fbf938e508fd10b01cb8d699c79083813takashi/* #define APR_RING_DEBUG 1 */
af84459fbf938e508fd10b01cb8d699c79083813takashi * Create Timers.
af84459fbf938e508fd10b01cb8d699c79083813takashistatic apr_status_t simple_main_setup_timers(simple_core_t * sc)
af84459fbf938e508fd10b01cb8d699c79083813takashi simple_register_timer(sc, simple_check_children_size, NULL, 0);
af84459fbf938e508fd10b01cb8d699c79083813takashi * Create worker thread pool.
af84459fbf938e508fd10b01cb8d699c79083813takashistatic apr_status_t simple_setup_workers(simple_core_t * sc)
af84459fbf938e508fd10b01cb8d699c79083813takashi "simple_setup_workers: spawning %d threads",
af84459fbf938e508fd10b01cb8d699c79083813takashi "simple_setup_workers: apr_thread_pool_create with %d threads failed",
af84459fbf938e508fd10b01cb8d699c79083813takashistatic apr_status_t simple_setup_listeners(simple_core_t * sc)
af84459fbf938e508fd10b01cb8d699c79083813takashi for (lr = ap_listeners; lr != NULL; lr = lr->next) {
af84459fbf938e508fd10b01cb8d699c79083813takashi apr_pollfd_t *pfd = apr_palloc(sc->pool, sizeof(apr_pollfd_t));
af84459fbf938e508fd10b01cb8d699c79083813takashi simple_sb_t *sb = apr_pcalloc(sc->pool, sizeof(simple_sb_t));
if (rv) {
return rv;
if (rv) {
return rv;
return APR_SUCCESS;
abort();
abort();
return rv;
return NULL;
#ifndef apr_time_from_msec
timeout = 0;
if (rv) {
return !OK;
ep,
if (rv) {
if (rv) {
return rv;
if (rv) {
return !OK;
if (rv) {
return !OK;
if (rv) {
return !OK;
if (rv) {
return !OK;
if (rv) {
return !OK;