Main Page | Modules | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

beos/mpm_default.h

Go to the documentation of this file.
00001 /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
00002  * applicable.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * 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 
00017 #ifndef APACHE_MPM_DEFAULT_H
00018 #define APACHE_MPM_DEFAULT_H
00019 
00020 /* we use the child (c) as zero in our code... */
00021 #define AP_ID_FROM_CHILD_THREAD(c, t)     t
00022 /* as the child is always zero, just return the id... */
00023 #define AP_CHILD_THREAD_FROM_ID(i)        0 , i
00024 
00025 /* Number of threads to spawn off by default --- also, if fewer than
00026  * this free when the caretaker checks, it will spawn more.
00027  */
00028 #ifndef DEFAULT_START_THREADS
00029 #define DEFAULT_START_THREADS 10
00030 #endif
00031 
00032 #ifdef NO_THREADS
00033 #define DEFAULT_THREADS 1
00034 #endif
00035 #ifndef DEFAULT_THREADS
00036 #define DEFAULT_THREADS 10
00037 #endif
00038 
00039 /* The following 2 settings are used to control the number of threads
00040  * we have available.  Normally the DEFAULT_MAX_FREE_THREADS is set
00041  * to the same as the HARD_THREAD_LIMIT to avoid churning of starting
00042  * new threads to replace threads killed off...
00043  */
00044 
00045 /* Maximum number of *free* threads --- more than this, and
00046  * they will die off.
00047  */
00048 #ifndef DEFAULT_MAX_FREE_THREADS
00049 #define DEFAULT_MAX_FREE_THREADS HARD_THREAD_LIMIT
00050 #endif
00051 
00052 /* Minimum --- fewer than this, and more will be created */
00053 #ifndef DEFAULT_MIN_FREE_THREADS
00054 #define DEFAULT_MIN_FREE_THREADS 1
00055 #endif
00056                    
00057 /* Where the main/parent process's pid is logged */
00058 #ifndef DEFAULT_PIDLOG
00059 #define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
00060 #endif
00061 
00062 /*
00063  * Interval, in microseconds, between scoreboard maintenance.
00064  */
00065 #ifndef SCOREBOARD_MAINTENANCE_INTERVAL
00066 #define SCOREBOARD_MAINTENANCE_INTERVAL 1000000
00067 #endif
00068 
00069 /* Number of requests to try to handle in a single process.  If == 0,
00070  * the children don't die off.
00071  */
00072 #ifndef DEFAULT_MAX_REQUESTS_PER_THREAD
00073 #define DEFAULT_MAX_REQUESTS_PER_THREAD 0
00074 #endif
00075 
00076 #endif /* AP_MPM_DEFAULT_H */