apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/locks/unix proc_mutex.c
Date Sat, 05 Jun 2004 11:39:03 GMT
jorton      2004/06/05 04:39:03

  Modified:    locks/unix proc_mutex.c
  Log:
  * locks/unix/proc_mutex.c (proc_mutex_no_child_init): Use single noop
  _child_init function.  (proc_mutex_posix_setup,
  proc_mutex_proc_pthread_setup, proc_mutex_flock_setup): Remove empty
  functions.
  
  Revision  Changes    Path
  1.38      +15 -51    apr/locks/unix/proc_mutex.c
  
  Index: proc_mutex.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/unix/proc_mutex.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -d -w -u -r1.37 -r1.38
  --- proc_mutex.c	5 Jun 2004 11:24:05 -0000	1.37
  +++ proc_mutex.c	5 Jun 2004 11:39:03 -0000	1.38
  @@ -28,16 +28,22 @@
       return APR_ENOTIMPL;
   }
   
  +#if APR_HAS_POSIXSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || \
  +    APR_HAS_PROC_PTHREAD_SERIALIZE || APR_HAS_SYSVSEM_SERIALIZE
  +static apr_status_t proc_mutex_no_child_init(apr_proc_mutex_t **mutex,
  +                                             apr_pool_t *cont,
  +                                             const char *fname)
  +{
  +    return APR_SUCCESS;
  +}
  +#endif    
  +
   #if APR_HAS_POSIXSEM_SERIALIZE
   
   #ifndef SEM_FAILED
   #define SEM_FAILED (-1)
   #endif
   
  -static void proc_mutex_posix_setup(void)
  -{
  -}
  -
   static apr_status_t proc_mutex_posix_cleanup(void *mutex_)
   {
       apr_proc_mutex_t *mutex=mutex_;
  @@ -137,13 +143,6 @@
       return APR_SUCCESS;
   }
   
  -static apr_status_t proc_mutex_posix_child_init(apr_proc_mutex_t **mutex,
  -                                                apr_pool_t *cont,
  -                                                const char *fname)
  -{
  -    return APR_SUCCESS;
  -}
  -
   const apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_posix_methods =
   {
   #if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS || defined(POSIXSEM_IS_GLOBAL)
  @@ -156,7 +155,7 @@
       proc_mutex_no_tryacquire,
       proc_mutex_posix_release,
       proc_mutex_posix_cleanup,
  -    proc_mutex_posix_child_init,
  +    proc_mutex_no_child_init,
       "posixsem"
   };
   
  @@ -244,11 +243,6 @@
       return APR_SUCCESS;
   }
   
  -static apr_status_t proc_mutex_sysv_child_init(apr_proc_mutex_t **mutex, apr_pool_t *cont,
const char *fname)
  -{
  -    return APR_SUCCESS;
  -}
  -
   const apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_sysv_methods =
   {
   #if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS || defined(SYSVSEM_IS_GLOBAL)
  @@ -261,7 +255,7 @@
       proc_mutex_no_tryacquire,
       proc_mutex_sysv_release,
       proc_mutex_sysv_cleanup,
  -    proc_mutex_sysv_child_init,
  +    proc_mutex_no_child_init,
       "sysvsem"
   };
   
  @@ -269,10 +263,6 @@
   
   #if APR_HAS_PROC_PTHREAD_SERIALIZE
   
  -static void proc_mutex_proc_pthread_setup(void)
  -{
  -}
  -
   static apr_status_t proc_mutex_proc_pthread_cleanup(void *mutex_)
   {
       apr_proc_mutex_t *mutex=mutex_;
  @@ -409,13 +399,6 @@
       return APR_SUCCESS;
   }
   
  -static apr_status_t proc_mutex_proc_pthread_child_init(apr_proc_mutex_t **mutex,
  -                                            apr_pool_t *cont, 
  -                                            const char *fname)
  -{
  -    return APR_SUCCESS;
  -}
  -
   const apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_proc_pthread_methods =
   {
       APR_PROCESS_LOCK_MECH_IS_GLOBAL,
  @@ -424,7 +407,7 @@
       proc_mutex_no_tryacquire,
       proc_mutex_proc_pthread_release,
       proc_mutex_proc_pthread_cleanup,
  -    proc_mutex_proc_pthread_child_init,
  +    proc_mutex_no_child_init,
       "pthread"
   };
   
  @@ -528,13 +511,6 @@
       return APR_SUCCESS;
   }
   
  -static apr_status_t proc_mutex_fcntl_child_init(apr_proc_mutex_t **mutex,
  -                                                apr_pool_t *pool, 
  -                                                const char *fname)
  -{
  -    return APR_SUCCESS;
  -}
  -
   const apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_fcntl_methods =
   {
   #if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS || defined(FCNTL_IS_GLOBAL)
  @@ -547,7 +523,7 @@
       proc_mutex_no_tryacquire,
       proc_mutex_fcntl_release,
       proc_mutex_fcntl_cleanup,
  -    proc_mutex_fcntl_child_init,
  +    proc_mutex_no_child_init,
       "fcntl"
   };
   
  @@ -557,10 +533,6 @@
   
   static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *);
   
  -static void proc_mutex_flock_setup(void)
  -{
  -}
  -
   static apr_status_t proc_mutex_flock_cleanup(void *mutex_)
   {
       apr_status_t status;
  @@ -680,20 +652,12 @@
   
   void apr_proc_mutex_unix_setup_lock(void)
   {
  -#if APR_HAS_POSIXSEM_SERIALIZE
  -    proc_mutex_posix_setup();
  -#endif
  +    /* setup only needed for sysvsem and fnctl */
   #if APR_HAS_SYSVSEM_SERIALIZE
       proc_mutex_sysv_setup();
   #endif
  -#if APR_HAS_PROC_PTHREAD_SERIALIZE
  -    proc_mutex_proc_pthread_setup();
  -#endif
   #if APR_HAS_FCNTL_SERIALIZE
       proc_mutex_fcntl_setup();
  -#endif
  -#if APR_HAS_FLOCK_SERIALIZE
  -    proc_mutex_flock_setup();
   #endif
   }
   
  
  
  

Mime
View raw message