]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*) core: add ap_sb_get_child_thread() to retrieve child_num
authorStefan Eissing <icing@apache.org>
Tue, 19 Apr 2022 10:16:02 +0000 (10:16 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 19 Apr 2022 10:16:02 +0000 (10:16 +0000)
     and thread_num from a scoreboard handle.

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

include/ap_mmn.h
include/scoreboard.h
server/scoreboard.c

index 7b6753cbe4c419c6c903494a9bab2ee436ce6f9e..88868775a71c27c838d943c6134f30ce915872a1 100644 (file)
  *                         Add new http/1.x formatting helpers
  *                         Add ap_assign_request_line()
  * 20211221.7 (2.5.1-dev)  Add ap_h1_append_header()
+ * 20211221.8 (2.5.1-dev)  Add ap_sb_get_child_thread()
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
 #define MODULE_MAGIC_NUMBER_MAJOR 20211221
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 7             /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 8             /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
index 321b32778a0b4cc437f2208336a211d518a75528..7cf92e405a4c7a4961f8b1a7835a6f72b68feceb 100644 (file)
@@ -183,6 +183,8 @@ AP_DECLARE(void) ap_create_sb_handle(ap_sb_handle_t **new_sbh, apr_pool_t *p,
                                      int child_num, int thread_num);
 AP_DECLARE(void) ap_update_sb_handle(ap_sb_handle_t *sbh,
                                      int child_num, int thread_num);
+AP_DECLARE(void) ap_sb_get_child_thread(ap_sb_handle_t *sbh,
+                                        int *pchild_num, int *pthread_num);
 
 AP_DECLARE(int) ap_find_child_by_pid(apr_proc_t *pid);
 AP_DECLARE(int) ap_update_child_status(ap_sb_handle_t *sbh, int status, request_rec *r);
index 688f89f75f4dfd0a76737af00aacce806d3a1a66..181477e357890e90508e93e8401d745b549c1e03 100644 (file)
@@ -429,6 +429,14 @@ AP_DECLARE(void) ap_create_sb_handle(ap_sb_handle_t **new_sbh, apr_pool_t *p,
     ap_update_sb_handle(*new_sbh, child_num, thread_num);
 }
 
+AP_DECLARE(void) ap_sb_get_child_thread(ap_sb_handle_t *sbh,
+                                        int *pchild_num, int *pthread_num)
+{
+    AP_DEBUG_ASSERT(sbh);
+    *pchild_num = sbh->child_num;
+    *pthread_num = sbh->thread_num;
+}
+
 static void copy_request(char *rbuf, apr_size_t rbuflen, request_rec *r)
 {
     char *p;