Commit 63614d8c authored by Ryan Bloom's avatar Ryan Bloom
Browse files

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.

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
parent c38ab454
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
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
+2 −1
Original line number Diff line number Diff line
@@ -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;
+17 −0
Original line number Diff line number Diff line
@@ -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]);
}