httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/netware mpm.h mpm_default.h mpm_netware.c
Date Wed, 17 Mar 2004 19:47:08 GMT
bnicholes    2004/03/17 11:47:08

  Modified:    server/mpm/netware mpm.h mpm_default.h mpm_netware.c
  Log:
  Adapt the mpm_netware version of the ThreadStackSize directive to the common version
  
  Revision  Changes    Path
  1.12      +1 -1      httpd-2.0/server/mpm/netware/mpm.h
  
  Index: mpm.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/netware/mpm.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mpm.h	9 Feb 2004 20:40:51 -0000	1.11
  +++ mpm.h	17 Mar 2004 19:47:08 -0000	1.12
  @@ -31,6 +31,7 @@
   */
   #define AP_MPM_WANT_SET_MAX_REQUESTS
   #define AP_MPM_WANT_SET_MAX_MEM_FREE
  +#define AP_MPM_WANT_SET_STACKSIZE
   #define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
   /*#define AP_MPM_WANT_SET_COREDUMPDIR
     #define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH 
  @@ -40,7 +41,6 @@
   #define MPM_NOTE_CHILD_KILLED(i) (MPM_CHILD_PID(i) = 0)
   
   extern int ap_threads_per_child;
  -extern int ap_thread_stack_size;
   extern int ap_max_workers_limit;
   extern server_rec *ap_server_conf;
   
  
  
  
  1.14      +6 -0      httpd-2.0/server/mpm/netware/mpm_default.h
  
  Index: mpm_default.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/netware/mpm_default.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mpm_default.h	9 Feb 2004 20:40:51 -0000	1.13
  +++ mpm_default.h	17 Mar 2004 19:47:08 -0000	1.14
  @@ -104,4 +104,10 @@
   #define DEFAULT_MAX_REQUESTS_PER_CHILD 0
   #endif
   
  +/* Default stack size allocated for each worker thread.
  + */
  +#ifndef DEFAULT_THREAD_STACKSIZE
  +#define DEFAULT_THREAD_STACKSIZE 65536
  +#endif
  +
   #endif /* AP_MPM_DEFAULT_H */
  
  
  
  1.86      +2 -16     httpd-2.0/server/mpm/netware/mpm_netware.c
  
  Index: mpm_netware.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/netware/mpm_netware.c,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- mpm_netware.c	16 Mar 2004 02:46:09 -0000	1.85
  +++ mpm_netware.c	17 Mar 2004 19:47:08 -0000	1.86
  @@ -106,7 +106,6 @@
   /* config globals */
   
   int ap_threads_per_child=0;         /* Worker threads per child */
  -int ap_thread_stack_size=65536;
   static int ap_threads_to_start=0;
   static int ap_threads_min_free=0;
   static int ap_threads_max_free=0;
  @@ -527,7 +526,7 @@
       ap_update_child_status_from_indexes(0, slot, WORKER_STARTING, 
                                           (request_rec *) NULL);
   
  -    if (ctx = NXContextAlloc((void (*)(void *)) worker_main, (void*)slot, NX_PRIO_MED,
ap_thread_stack_size, NX_CTX_NORMAL, &err)) {
  +    if (ctx = NXContextAlloc((void (*)(void *)) worker_main, (void*)slot, NX_PRIO_MED,
ap_thread_stacksize, NX_CTX_NORMAL, &err)) {
           char threadName[32];
   
           sprintf (threadName, "Apache_Worker %d", slot);
  @@ -980,6 +979,7 @@
       ap_threads_limit = HARD_THREAD_LIMIT;
       ap_max_requests_per_child = DEFAULT_MAX_REQUESTS_PER_CHILD;
       ap_extended_status = 0;
  +    ap_thread_stacksize = DEFAULT_THREAD_STACKSIZE;
   #ifdef AP_MPM_WANT_SET_MAX_MEM_FREE
   	ap_max_mem_free = APR_ALLOCATOR_MAX_FREE_UNLIMITED;
   #endif
  @@ -1258,21 +1258,7 @@
       return NULL;
   }
   
  -static const char *set_thread_stacksize(cmd_parms *cmd, void *dummy, 
  -                                        const char *arg)
  -{
  -    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
  -    if (err != NULL) {
  -        return err;
  -    }
  -    
  -    ap_thread_stack_size = atoi(arg);
  -    return NULL;
  -}
  -
   static const command_rec netware_mpm_cmds[] = {
  -AP_INIT_TAKE1("ThreadStackSize", set_thread_stacksize, NULL, RSRC_CONF,
  -              "Stack size each created thread will use."),
   LISTEN_COMMANDS,
   AP_INIT_TAKE1("StartThreads", set_threads_to_start, NULL, RSRC_CONF,
                 "Number of worker threads launched at server startup"),
  
  
  

Mime
View raw message