httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/worker worker.c mpm.h
Date Tue, 25 Dec 2001 02:30:54 GMT
dreid       01/12/24 18:30:54

  Modified:    server/mpm/worker worker.c mpm.h
  Log:
  This allows platforms without the _NP locking palaver to build
  the worker MPM.
  
  Revision  Changes    Path
  1.52      +8 -0      httpd-2.0/server/mpm/worker/worker.c
  
  Index: worker.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/worker/worker.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- worker.c	2001/12/23 13:56:49	1.51
  +++ worker.c	2001/12/25 02:30:53	1.52
  @@ -1391,14 +1391,21 @@
       ap_lock_fname = apr_psprintf(_pconf, "%s.%" APR_OS_PROC_T_FMT,
                                    ap_server_root_relative(_pconf, ap_lock_fname),
                                    ap_my_pid);
  +
  +#if APR_HAS_CREATE_LOCKS_NP
       rv = apr_proc_mutex_create_np(&accept_mutex, ap_lock_fname, 
                                     ap_accept_lock_mech, _pconf);
  +#else
  +    rv = apr_proc_mutex_create(&accept_mutex, ap_lock_fname, _pconf);
  +#endif /* APR_HAS_CREATE_LOCKS_NP */
  +
       if (rv != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
                        "Couldn't create accept lock");
           return 1;
       }
   
  +#if APR_HAS_CREATE_LOCKS_NP
   #if APR_USE_SYSVSEM_SERIALIZE
       if (ap_accept_lock_mech == APR_LOCK_DEFAULT || 
           ap_accept_lock_mech == APR_LOCK_SYSVSEM) {
  @@ -1412,6 +1419,7 @@
               return 1;
           }
       }
  +#endif /* APR_HAS_CREATE_LOCKS_NP */
   
       if (!is_graceful) {
           ap_run_pre_mpm(pconf, SB_SHARED);
  
  
  
  1.7       +2 -0      httpd-2.0/server/mpm/worker/mpm.h
  
  Index: mpm.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/worker/mpm.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mpm.h	2001/11/14 23:13:27	1.6
  +++ mpm.h	2001/12/25 02:30:53	1.7
  @@ -73,7 +73,9 @@
   #define AP_MPM_WANT_SET_LOCKFILE
   #define AP_MPM_WANT_SET_MAX_REQUESTS
   #define AP_MPM_WANT_SET_COREDUMPDIR
  +#if APR_HAS_CREATE_LOCKS_NP
   #define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
  +#endif /* APR_HAS_CREATE_LOCKS_NP */
   #define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
   
   #define MPM_SYNC_CHILD_TABLE() (ap_sync_scoreboard_image())
  
  
  

Mime
View raw message