mpm.h revision 46102c57fc6ebc39c70057e071d59dd70d7a86e2
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/* ====================================================================
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The Apache Software License, Version 1.1
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * reserved.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Redistribution and use in source and binary forms, with or without
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * modification, are permitted provided that the following conditions
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * are met:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * 1. Redistributions of source code must retain the above copyright
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * notice, this list of conditions and the following disclaimer.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * 2. Redistributions in binary form must reproduce the above copyright
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * notice, this list of conditions and the following disclaimer in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * the documentation and/or other materials provided with the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * distribution.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * 3. The end-user documentation included with the redistribution,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * if any, must include the following acknowledgment:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * "This product includes software developed by the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Apache Software Foundation (http://www.apache.org/)."
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Alternately, this acknowledgment may appear in the software itself,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * if and wherever such third-party acknowledgments normally appear.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * 4. The names "Apache" and "Apache Software Foundation" must
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * not be used to endorse or promote products derived from this
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * software without prior written permission. For written
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * permission, please contact apache@apache.org.
f79113ae65937c28690ec71f68f54f862b758baePhill Cunnington *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * 5. Products derived from this software may not be called "Apache",
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * nor may "Apache" appear in their name, without prior written
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * permission of the Apache Software Foundation.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * SUCH DAMAGE.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * ====================================================================
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * This software consists of voluntary contributions made by many
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * individuals on behalf of the Apache Software Foundation. For more
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * information on the Apache Software Foundation, please see
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * <http://www.apache.org/>.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Portions of this software are based upon public domain software
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * originally written at the National Center for Supercomputing Applications,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * University of Illinois, Urbana-Champaign.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include "scoreboard.h"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include "unixd.h"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#ifndef APACHE_MPM_THREADED_H
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define APACHE_MPM_THREADED_H
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define THREADED_MPM
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define MPM_NAME "Threaded"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define AP_MPM_WANT_WAIT_OR_TIMEOUT
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define AP_MPM_WANT_PROCESS_CHILD_STATUS
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define AP_MPM_WANT_SET_PIDFILE
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define AP_MPM_WANT_SET_SCOREBOARD
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define AP_MPM_WANT_SET_LOCKFILE
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define AP_MPM_WANT_SET_MAX_REQUESTS
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define AP_MPM_WANT_SET_COREDUMPDIR
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define AP_MPM_NEEDS_RECLAIM_CHILD_PROCESSES 1
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define MPM_SYNC_CHILD_TABLE() (ap_sync_scoreboard_image())
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define MPM_NOTE_CHILD_KILLED(i) (MPM_CHILD_PID(i) = 0)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern int ap_threads_per_child;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern int ap_max_daemons_limit;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern server_rec *ap_server_conf;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#endif /* APACHE_MPM_THREADED_H */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster