]> granicus.if.org Git - apache/commitdiff
Add two functions to allow modules to access random parts of the
authorRyan Bloom <rbb@apache.org>
Tue, 10 Jul 2001 19:00:03 +0000 (19:00 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 10 Jul 2001 19:00:03 +0000 (19:00 +0000)
scoreboard.  This allows modules compiled for one MPM to access the
scoreboard, even if it the server was compiled for another MPM.

Submitted by: Harrie Hazewinkel <harrie@covalent.net>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89532 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
include/scoreboard.h
server/scoreboard.c

diff --git a/CHANGES b/CHANGES
index 1590153e924bedfeed7cd5e98c08733398a7c8d8..018b334032e32ca156b4f3f8882b3037decdb4be 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
 Changes with Apache 2.0.21-dev
 
+  *) Add two functions to allow modules to access random parts of the
+     scoreboard.  This allows modules compiled for one MPM to access the
+     scoreboard, even if it the server was compiled for another MPM.
+     [Harrie Hazewinkel <harrie@covalent.net>]
+
 Changes with Apache 2.0.20
 
   *) Fix problem in content-length filter where the filter would
index 48f45aaf6df46b65669c3882515d9c4b93eb5eb8..f36ec5ee8c77cadfa2e6cae31e8f4e6f4b0d24a8 100644 (file)
@@ -216,7 +216,8 @@ void update_scoreboard_global(void);
 AP_DECLARE(int) find_child_by_pid(apr_proc_t *pid);
 int ap_update_child_status(int child_num, int thread_num, int status, request_rec *r);
 void ap_time_process_request(int child_num, int thread_num, int status);
-
+worker_score *ap_get_servers_scoreboard(int x, int y);
+process_score *ap_get_parent_scoreboard(int x);
 
 AP_DECLARE_DATA extern scoreboard *ap_scoreboard_image;
 AP_DECLARE_DATA extern const char *ap_scoreboard_fname;
index 265bf23a90ae01c1a2e80a7a1081802825c461f3..a6237f923584784e15300db4633e3faf389708af 100644 (file)
@@ -340,3 +340,20 @@ void ap_time_process_request(int child_num, int thread_num, int status)
     put_scoreboard_info(child_num, thread_num, ws);
 }
 
+worker_score *ap_get_servers_scoreboard(int x, int y)
+{
+    if (((x < 0) || (HARD_SERVER_LIMIT < x)) ||
+        ((y < 0) || (HARD_THREAD_LIMIT < y))) {
+        return(NULL); /* Out of range */
+    }
+    return(&ap_scoreboard_image->servers[x][y]);
+}
+
+process_score *ap_get_parent_scoreboard(int x)
+{
+    if ((x < 0) || (HARD_SERVER_LIMIT < x)) {
+        return(NULL); /* Out of range */
+    }
+    return(&ap_scoreboard_image->parent[x]);
+}
+