Commit 7956a1ca authored by Bill Stoddard's avatar Bill Stoddard
Browse files

Begin restructuring scoreboard code to enable adding back in

the ability to use IPC other than shared memory.
Get mod_status working on Windows again.

Still to do:
Rename some of the function APIs. Replace all calls to reinit_scoreboard with
ap_create_scoreboard. Add back in support for scoreboard files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87959 13f79535-47bb-0310-9956-ffa450edef68
parent dc2a2594
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
Changes with Apache 2.0b1
  *) Begin restructuring scoreboard code to enable adding back in
     the ability to use IPC other than shared memory.
     Get mod_status working on Windows again. [Bill Stoddard]

  *) Make mod_status work with 2.0.  This will work for prefork,
     mpmt_pthread, and dexter.  [Ryan Bloom]
+11 −1
Original line number Diff line number Diff line
@@ -139,6 +139,14 @@ typedef unsigned vtime_t;
 */
typedef int ap_generation_t;

/* Is the scoreboard shared between processes or not? 
 * Set by the MPM when the scoreboard is created.
 */
typedef enum {
    SB_SHARED = 1,
    SB_NOT_SHARED = 2
} ap_scoreboard_e;

/* stuff which is thread/process specific */
typedef struct {
#ifdef OPTIMIZE_TIMEOUTS
@@ -168,6 +176,7 @@ typedef struct {
} short_score;

typedef struct {
    ap_scoreboard_e sb_type;
    ap_generation_t running_generation;	/* the generation of children which
                                         * should still be serving requests. */
} global_score;
@@ -211,12 +220,13 @@ typedef struct {
#endif

AP_DECLARE(int) ap_exists_scoreboard_image(void);
AP_DECLARE(void) ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e t);
void reinit_scoreboard(apr_pool_t *p);
apr_status_t ap_cleanup_shared_mem(void *d);

AP_DECLARE(void) reopen_scoreboard(apr_pool_t *p);

apr_inline void ap_sync_scoreboard_image(void);
void ap_sync_scoreboard_image(void);
void increment_counts(int child_num, int thread_num, request_rec *r);
void update_scoreboard_global(void);
AP_DECLARE(int) find_child_by_pid(apr_proc_t *pid);
+4 −0
Original line number Diff line number Diff line
@@ -227,6 +227,10 @@ SOURCE=.\server\log.c
# End Source File
# Begin Source File

SOURCE=.\server\scoreboard.c
# End Source File
# Begin Source File

SOURCE=.\server\vhost.c
# End Source File
# End Group
+4 −4
Original line number Diff line number Diff line
@@ -52,8 +52,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /incremental:no /map /out:"Release/mod_file_cache.so" /machine:I386 /base:@..\..\os\win32\BaseAddr.ref,mod_file_cache
# ADD LINK32 /nologo /subsystem:windows /dll /incremental:no /map /out:"Release/mod_file_cache.so" /machine:I386 /base:@..\..\os\win32\BaseAddr.ref,mod_file_cache
# ADD BASE LINK32 /nologo /subsystem:windows /dll /map /machine:I386 /out:"Release/mod_file_cache.so" /base:@..\..\os\win32\BaseAddr.ref,mod_file_cache
# ADD LINK32 /nologo /subsystem:windows /dll /map /machine:I386 /out:"Release/mod_file_cache.so" /base:@..\..\os\win32\BaseAddr.ref,mod_file_cache

!ELSEIF  "$(CFG)" == "mod_file_cache - Win32 Debug"

@@ -78,8 +78,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /incremental:no /map /debug /out:"Debug/mod_file_cache.so" /machine:I386 /base:@..\..\os\win32\BaseAddr.ref,mod_file_cache
# ADD LINK32 /nologo /subsystem:windows /dll /incremental:no /map /debug /out:"Debug/mod_file_cache.so" /machine:I386 /base:@..\..\os\win32\BaseAddr.ref,mod_file_cache
# ADD BASE LINK32 /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386 /out:"Debug/mod_file_cache.so" /base:@..\..\os\win32\BaseAddr.ref,mod_file_cache
# ADD LINK32 /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386 /out:"Debug/mod_file_cache.so" /base:@..\..\os\win32\BaseAddr.ref,mod_file_cache

!ENDIF 

+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ static int status_handler(request_rec *r)
    if (r->header_only)
	return 0;

    ap_sync_scoreboard_image();
/*    ap_sync_scoreboard_image(); */
    for (i = 0; i < HARD_SERVER_LIMIT; ++i) {
        for (j = 0; j < HARD_THREAD_LIMIT; ++j) {
            int indx = (i * HARD_THREAD_LIMIT) + j;
Loading