types should be opaque, opaque types should be transparent.
Solve one aspect, follow the _by_indexes() example for ap_get_scoreboard_worker
family of functions, and the primary one will now accept the abstracted conn_rec
value of sbh to find that connections slot.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@587770
13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]
+ *) core; scoreboard: ap_get_scoreboard_worker(sbh) now takes the sbh member
+ from the connection rec, ap_get_scoreboard_worker(proc, thread) will now
+ provide the unusual legacy lookup. Also cleans up PR 31127 range checks.
+ [William Rowe, Christian von Roques <roques mti.ag>]
+
*) mod_proxy_http: Check but don't escape/unescape forward-proxied URLs
PR 42592 [Nick Kew]
* 20070823.0 (2.3.0-dev) Removed ap_all_available_mutexes_string,
* ap_available_mutexes_string for macros
* 20070823.1 (2.3.0-dev) add ap_send_interim_response()
- *
+ * 20071023.0 (2.3.0-dev) add ap_get_scoreboard(sbh) split from the less
+ * conventional ap_get_scoreboard(proc, thread)
*/
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20070823
+#define MODULE_MAGIC_NUMBER_MAJOR 20071023
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
int status, request_rec *r);
void ap_time_process_request(ap_sb_handle_t *sbh, int status);
-AP_DECLARE(worker_score *) ap_get_scoreboard_worker(int x, int y);
+AP_DECLARE(worker_score *) ap_get_scoreboard_worker(ap_sb_handle_t *sbh);
+AP_DECLARE(worker_score *) ap_get_scoreboard_worker_from_indexes(int child_num,
+ int thread_num);
AP_DECLARE(process_score *) ap_get_scoreboard_process(int x);
AP_DECLARE(global_score *) ap_get_scoreboard_global(void);
AP_DECLARE(lb_score *) ap_get_scoreboard_lb(int lb_num);
for (j = 0; j < thread_limit; ++j) {
int indx = (i * thread_limit) + j;
- ws_record = ap_get_scoreboard_worker(i, j);
+ ws_record = ap_get_scoreboard_worker_from_indexes(i, j);
res = ws_record->status;
stat_buffer[indx] = status_flags[res];
for (i = 0; i < server_limit; ++i) {
for (j = 0; j < thread_limit; ++j) {
- ws_record = ap_get_scoreboard_worker(i, j);
+ ws_record = ap_get_scoreboard_worker_from_indexes(i, j);
if (ws_record->access_count == 0 &&
(ws_record->status == SERVER_READY ||
}
}
-AP_DECLARE(worker_score *) ap_get_scoreboard_worker(int x, int y)
+AP_DECLARE(worker_score *) ap_get_scoreboard_worker_from_indexes(int x, int y)
{
- if (((x < 0) || (x >= server_limit)) ||
- ((y < 0) || (y >= thread_limit))) {
+ if (((x < 0) || (x > server_limit)) ||
+ ((y < 0) || (y > thread_limit))) {
return(NULL); /* Out of range */
}
return &ap_scoreboard_image->servers[x][y];
}
+AP_DECLARE(worker_score *) ap_get_scoreboard_worker(ap_sb_handle_t *sbh)
+{
+ return ap_get_scoreboard_worker_from_indexes(sbh->child_num,
+ sbh->thread_num);
+}
+
AP_DECLARE(process_score *) ap_get_scoreboard_process(int x)
{
if ((x < 0) || (x >= server_limit)) {