00001 /* Licensed to the Apache Software Foundation (ASF) under one or more 00002 * contributor license agreements. See the NOTICE file distributed with 00003 * this work for additional information regarding copyright ownership. 00004 * The ASF licenses this file to You under the Apache License, Version 2.0 00005 * (the "License"); you may not use this file except in compliance with 00006 * the License. You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00024 #ifndef APACHE_MPM_DEFAULT_H 00025 #define APACHE_MPM_DEFAULT_H 00026 00027 /* we use the child (c) as zero in our code... */ 00028 #define AP_ID_FROM_CHILD_THREAD(c, t) t 00029 /* as the child is always zero, just return the id... */ 00030 #define AP_CHILD_THREAD_FROM_ID(i) 0 , i 00031 00032 /* Number of threads to spawn off by default --- also, if fewer than 00033 * this free when the caretaker checks, it will spawn more. 00034 */ 00035 #ifndef DEFAULT_START_THREADS 00036 #define DEFAULT_START_THREADS 10 00037 #endif 00038 00039 #ifdef NO_THREADS 00040 #define DEFAULT_THREADS 1 00041 #endif 00042 #ifndef DEFAULT_THREADS 00043 #define DEFAULT_THREADS 10 00044 #endif 00045 00046 /* The following 2 settings are used to control the number of threads 00047 * we have available. Normally the DEFAULT_MAX_FREE_THREADS is set 00048 * to the same as the HARD_THREAD_LIMIT to avoid churning of starting 00049 * new threads to replace threads killed off... 00050 */ 00051 00052 /* Maximum number of *free* threads --- more than this, and 00053 * they will die off. 00054 */ 00055 #ifndef DEFAULT_MAX_FREE_THREADS 00056 #define DEFAULT_MAX_FREE_THREADS HARD_THREAD_LIMIT 00057 #endif 00058 00059 /* Minimum --- fewer than this, and more will be created */ 00060 #ifndef DEFAULT_MIN_FREE_THREADS 00061 #define DEFAULT_MIN_FREE_THREADS 1 00062 #endif 00063 00064 /* Where the main/parent process's pid is logged */ 00065 #ifndef DEFAULT_PIDLOG 00066 #define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid" 00067 #endif 00068 00069 /* 00070 * Interval, in microseconds, between scoreboard maintenance. 00071 */ 00072 #ifndef SCOREBOARD_MAINTENANCE_INTERVAL 00073 #define SCOREBOARD_MAINTENANCE_INTERVAL 1000000 00074 #endif 00075 00076 /* Number of requests to try to handle in a single process. If == 0, 00077 * the children don't die off. 00078 */ 00079 #ifndef DEFAULT_MAX_REQUESTS_PER_THREAD 00080 #define DEFAULT_MAX_REQUESTS_PER_THREAD 0 00081 #endif 00082 00083 #endif /* AP_MPM_DEFAULT_H */ 00084