scoreboard.c revision c0976866735b2f73652e977329fe6fe8cff96a6d
2d0611ffc9f91c5fc2ddccb93f9a3d17791ae650takashi/* Licensed to the Apache Software Foundation (ASF) under one or more
2d0611ffc9f91c5fc2ddccb93f9a3d17791ae650takashi * contributor license agreements. See the NOTICE file distributed with
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd * this work for additional information regarding copyright ownership.
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd * The ASF licenses this file to You under the Apache License, Version 2.0
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd * (the "License"); you may not use this file except in compliance with
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd * the License. You may obtain a copy of the License at
af84459fbf938e508fd10b01cb8d699c79083813takashi * Unless required by applicable law or agreed to in writing, software
6ae232055d4d8a97267517c5e50074c2c819941and * distributed under the License is distributed on an "AS IS" BASIS,
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6ae232055d4d8a97267517c5e50074c2c819941and * See the License for the specific language governing permissions and
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd * limitations under the License.
#define APR_WANT_STRFUNC
#include "apr_want.h"
#include "ap_config.h"
#include "httpd.h"
#include "http_log.h"
#include "http_main.h"
#include "http_core.h"
#include "http_config.h"
#include "ap_mpm.h"
#include "scoreboard.h"
const char *arg)
return err;
return NULL;
return err;
return NULL;
return err;
return NULL;
#include "apr_shm.h"
#ifndef WIN32
struct ap_sb_handle_t {
int child_num;
int thread_num;
return APR_SUCCESS;
return scoreboard_size;
char *more_storage;
for (i = 0; i < server_limit; i++) {
const char *fname)
return rv;
return APR_SUCCESS;
return rv;
if (ap_scoreboard_fname) {
if (!fname) {
return APR_EBADPATH;
return rv;
return APR_SUCCESS;
if (!detached) {
return APR_SUCCESS;
return APR_EINVAL;
if (*shm) {
return APR_SUCCESS;
return APR_SUCCESS;
return APR_SUCCESS;
if (ap_scoreboard_image) {
for (i = 0; i < server_limit; i++) {
return OK;
void *sb_shared;
return HTTP_INTERNAL_SERVER_ERROR;
return HTTP_INTERNAL_SERVER_ERROR;
return OK;
if (!sb)
bytes = 0;
#ifdef HAVE_TIMES
int max_daemons_limit;
for (i = 0; i < max_daemons_limit; ++i) {
p = r->the_request;
if (!ap_mod_status_reqtail) {
int thread_num,
int status,
conn_rec *c,
request_rec *r)
int old_status;
int mpm_generation;
if (ap_extended_status) {
if (r->server) {
return old_status;
int thread_num,
int status,
request_rec *r)
if (child_num < 0) {
request_rec *r)
if (!sbh)
conn_rec *c)
if (!sbh)
if (!sbh)
if (((x < 0) || (x >= server_limit)) ||
((y < 0) || (y >= thread_limit))) {
if (!sbh)
return NULL;
if ((x < 0) || (x >= server_limit)) {