e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim/* Licensed to the Apache Software Foundation (ASF) under one or more
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * contributor license agreements. See the NOTICE file distributed with
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * this work for additional information regarding copyright ownership.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * The ASF licenses this file to You under the Apache License, Version 2.0
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * (the "License"); you may not use this file except in compliance with
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * the License. You may obtain a copy of the License at
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * Unless required by applicable law or agreed to in writing, software
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * distributed under the License is distributed on an "AS IS" BASIS,
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * See the License for the specific language governing permissions and
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * limitations under the License.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim/* Limit on the total --- clients will be locked out if more servers than
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * this are needed. It is intended solely to keep the server from crashing
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * when things get out of hand.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * We keep a hard maximum number of servers, for two reasons --- first off,
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * in case something goes seriously wrong, we want to stop the fork bomb
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * short of actually crashing the machine we're running on by filling some
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * kernel table. Secondly, it keeps the size of the scoreboard file small
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * enough that we can read the whole thing without worrying too much about
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * the overhead.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim/* Admin can't tune ServerLimit beyond MAX_SERVER_LIMIT. We want
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * some sort of compile-time limit to help catch typos.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim/* Limit on the threads per process. Clients will be locked out if more than
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * this are needed.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * We keep this for one reason it keeps the size of the scoreboard file small
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * enough that we can read the whole thing without worrying too much about
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * the overhead.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim/* Admin can't tune ThreadLimit beyond MAX_THREAD_LIMIT. We want
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * some sort of compile-time limit to help catch typos.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim#define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * typedefs
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim/* data retained by prefork across load/unload of the module
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * allocated on first call to pre-config hook; located on
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * subsequent calls to pre-config hook
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * The max child slot ever assigned, preserved across restarts. Necessary
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * to deal with MaxRequestWorkers changes across AP_SIG_GRACEFUL restarts. We
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim * use this value to optimize routines that have to scan the entire scoreboard.
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimtypedef enum
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimtypedef void (*motorz_timer_cb) (motorz_core_t *mz, void *baton);
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimtypedef void (*motorz_io_sock_cb) (motorz_core_t *mz, apr_socket_t *sock,
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jimtypedef void (*motorz_io_file_cb) (motorz_core_t *mz, apr_socket_t *sock,
ccb1d3d23d96790217807954139c625ec9763350jim /** connection record this struct refers to */
ccb1d3d23d96790217807954139c625ec9763350jim /** request record (if any) this struct refers to */
ccb1d3d23d96790217807954139c625ec9763350jim /** is the current conn_rec suspended? */
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim /** poll file descriptor information */
e727b3cfc15b8a21efaafccb7ca41795f2a060d5jim /** public parts of the connection state */
6415151dcc1f5a7257cfe440efd0558adcccedc3ylavic /** timer associated with the connection */