scoreboard.c revision 95e04bdfdb8fbb70158afd18bbf0acc340615d65
54fa287ac0c32e02a62568c0f02f8a00000a3398nd/* Licensed to the Apache Software Foundation (ASF) under one or more
54fa287ac0c32e02a62568c0f02f8a00000a3398nd * contributor license agreements. See the NOTICE file distributed with
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd * this work for additional information regarding copyright ownership.
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd * The ASF licenses this file to You under the Apache License, Version 2.0
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd * (the "License"); you may not use this file except in compliance with
54fa287ac0c32e02a62568c0f02f8a00000a3398nd * the License. You may obtain a copy of the License at
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc * Unless required by applicable law or agreed to in writing, software
5a58787efeb02a1c3f06569d019ad81fd2efa06end * distributed under the License is distributed on an "AS IS" BASIS,
5a58787efeb02a1c3f06569d019ad81fd2efa06end * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen * See the License for the specific language governing permissions and
2e545ce2450a9953665f701bb05350f0d3f26275nd * limitations under the License.
54fa287ac0c32e02a62568c0f02f8a00000a3398nd/* we know core's module_index is 0 */
b12f74e1aaac71d21e4b9a376b31d7307a8d87d8ndconst char * ap_set_scoreboard(cmd_parms *cmd, void *dummy,
54fa287ac0c32e02a62568c0f02f8a00000a3398nd const char *arg)
54fa287ac0c32e02a62568c0f02f8a00000a3398nd const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
b12f74e1aaac71d21e4b9a376b31d7307a8d87d8nd/* Default to false when mod_status is not loaded */
b12f74e1aaac71d21e4b9a376b31d7307a8d87d8ndconst char *ap_set_extended_status(cmd_parms *cmd, void *dummy, int arg)
54fa287ac0c32e02a62568c0f02f8a00000a3398nd const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
54fa287ac0c32e02a62568c0f02f8a00000a3398ndconst char *ap_set_reqtail(cmd_parms *cmd, void *dummy, int arg)
54fa287ac0c32e02a62568c0f02f8a00000a3398nd const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
54fa287ac0c32e02a62568c0f02f8a00000a3398ndstatic /* but must be exported to mpm_winnt */
5a58787efeb02a1c3f06569d019ad81fd2efa06end * This function should be renamed to cleanup_shared
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd * and it should handle cleaning up a scoreboard shared
a0e183666b44ebb43fdfeffe78d36c6134a59d4dyoshiki * between processes using any form of IPC (file, shared memory
253547fb9cc7986e84ff68aef076f664fc4169dctakashi * segment, etc.). Leave it as is now because it is being used
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0nd * by various MPMs.
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;
int detached)
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 OK;
if (!sb)
bytes = 0;
#ifdef HAVE_TIMES
int max_daemons_limit = 0;
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;
int child_num,
int thread_num)
if ((x < 0) || (x >= server_limit)) {