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_netware.c
Date Tue, 03 Jun 2003 19:48:55 GMT
bnicholes    2003/06/03 12:48:55

  Modified:    server/mpm/netware Tag: APACHE_2_0_BRANCH mpm_netware.c
  Log:
  Simplify the per-thread pool handling in the NetWare MPM
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.62.2.8  +16 -15    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.62.2.7
  retrieving revision 1.62.2.8
  diff -u -r1.62.2.7 -r1.62.2.8
  --- mpm_netware.c	20 May 2003 15:12:57 -0000	1.62.2.7
  +++ mpm_netware.c	3 Jun 2003 19:48:54 -0000	1.62.2.8
  @@ -212,14 +212,13 @@
   ap_generation_t volatile ap_my_generation=0;
   
   /* a clean exit from a child with proper cleanup */
  -static void clean_child_exit(int code, int worker_num, apr_pool_t *ptrans, 
  -                             apr_bucket_alloc_t *bucket_alloc, apr_pool_t *pthrd) __attribute__
((noreturn));
  -static void clean_child_exit(int code, int worker_num, apr_pool_t *ptrans, 
  -                             apr_bucket_alloc_t *bucket_alloc, apr_pool_t *pthrd)
  +static void clean_child_exit(int code, int worker_num, apr_pool_t *pthrd, 
  +                             apr_bucket_alloc_t *bucket_alloc) __attribute__ ((noreturn));
  +static void clean_child_exit(int code, int worker_num, apr_pool_t *pthrd, 
  +                             apr_bucket_alloc_t *bucket_alloc)
   {
       if (!shutdown_pending) {
           apr_bucket_alloc_destroy(bucket_alloc);
  -        apr_pool_destroy(ptrans);
           apr_pool_destroy(pthrd);
       }
   
  @@ -384,13 +383,14 @@
   
       apr_allocator_create(&allocator);
       apr_allocator_max_free_set(allocator, ap_max_mem_free);
  -    apr_pool_create_ex(&ptrans, NULL, NULL, allocator);
  -    apr_allocator_owner_set(allocator, ptrans);
  -    apr_pool_tag(ptrans, "transaction");
   
  -    apr_pool_create(&pthrd, pmain);
  +    apr_pool_create_ex(&pthrd, pmain, NULL, allocator);
  +    apr_allocator_owner_set(allocator, pthrd);
       apr_pool_tag(pthrd, "worker_thrd_pool");
   
  +    apr_pool_create(&ptrans, pthrd);
  +    apr_pool_tag(ptrans, "transaction");
  +
       bucket_alloc = apr_bucket_alloc_create(pthrd);
   
       atomic_inc (&worker_thread_count);
  @@ -404,7 +404,8 @@
   
           if ((ap_max_requests_per_child > 0
               && requests_this_child++ >= ap_max_requests_per_child)) {
  -            clean_child_exit(0, my_worker_num, ptrans, bucket_alloc, pthrd);
  +            DBPRINT1 ("\n**Thread slot %d is shutting down", my_worker_num);
  +            clean_child_exit(0, my_worker_num, pthrd, bucket_alloc);
           }
   
           ap_update_child_status_from_indexes(0, my_worker_num, WORKER_READY, 
  @@ -417,7 +418,7 @@
           for (;;) {
               if (shutdown_pending || restart_pending || (ap_scoreboard_image->servers[0][my_worker_num].status
== WORKER_IDLE_KILL)) {
                   DBPRINT1 ("\nThread slot %d is shutting down\n", my_worker_num);
  -                clean_child_exit(0, my_worker_num, ptrans, bucket_alloc, pthrd);
  +                clean_child_exit(0, my_worker_num, pthrd, bucket_alloc);
               }
   
               /* Check the listen queue on all sockets for requests */
  @@ -526,13 +527,13 @@
                           */
                           ap_log_error(APLOG_MARK, APLOG_EMERG, stat, ap_server_conf,
                               "apr_accept: giving up.");
  -                        clean_child_exit(APEXIT_CHILDFATAL, my_worker_num, ptrans, 
  -                                         bucket_alloc, pthrd);
  +                        clean_child_exit(APEXIT_CHILDFATAL, my_worker_num, pthrd, 
  +                                         bucket_alloc);
                   }
                   else {
                           ap_log_error(APLOG_MARK, APLOG_ERR, stat, ap_server_conf,
                               "apr_accept: (client socket)");
  -                        clean_child_exit(1, my_worker_num, ptrans, bucket_alloc, pthrd);
  +                        clean_child_exit(1, my_worker_num, pthrd, bucket_alloc);
                   }
               }
           }
  @@ -551,7 +552,7 @@
           }
           request_count++;
       }
  -    clean_child_exit(0, my_worker_num, ptrans, bucket_alloc, pthrd);
  +    clean_child_exit(0, my_worker_num, pthrd, bucket_alloc);
   }
   
   
  
  
  

Mime
View raw message