apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/locks/unix proc_mutex.c
Date Wed, 06 Aug 2003 23:54:31 GMT
wrowe       2003/08/06 16:54:31

  Modified:    locks/unix proc_mutex.c
  Log:
    Introduce the proc_mutex_no_tryacquire stub, returning APR_ENOTIMPL,
    for all unimplemented trylock vectors.  Prevents us from simply
    segfaulting when a given proc_mutex style does not support trylock.
  
    No Apache HTTP Server code attempted an apr_proc_mutex_trylock, but
    this could affect other platforms, and was inconsistent with the
    implementations of other mutex methods and other platform implementations.
  
  Revision  Changes    Path
  1.35      +9 -5      apr/locks/unix/proc_mutex.c
  
  Index: proc_mutex.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/unix/proc_mutex.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- proc_mutex.c	6 Aug 2003 23:50:13 -0000	1.34
  +++ proc_mutex.c	6 Aug 2003 23:54:31 -0000	1.35
  @@ -62,6 +62,10 @@
       return apr_pool_cleanup_run(mutex->pool, mutex, apr_proc_mutex_cleanup);
   }
   
  +static apr_status_t proc_mutex_no_tryacquire(apr_proc_mutex_t *new_mutex)
  +{
  +    return APR_ENOTIMPL;
  +}
   
   #if APR_HAS_POSIXSEM_SERIALIZE
   
  @@ -188,7 +192,7 @@
   #endif
       proc_mutex_posix_create,
       proc_mutex_posix_acquire,
  -    NULL, /* no tryacquire */
  +    proc_mutex_no_tryacquire,
       proc_mutex_posix_release,
       proc_mutex_posix_cleanup,
       proc_mutex_posix_child_init,
  @@ -293,7 +297,7 @@
   #endif
       proc_mutex_sysv_create,
       proc_mutex_sysv_acquire,
  -    NULL, /* no tryacquire */
  +    proc_mutex_no_tryacquire,
       proc_mutex_sysv_release,
       proc_mutex_sysv_cleanup,
       proc_mutex_sysv_child_init,
  @@ -456,7 +460,7 @@
       APR_PROCESS_LOCK_MECH_IS_GLOBAL,
       proc_mutex_proc_pthread_create,
       proc_mutex_proc_pthread_acquire,
  -    NULL, /* no tryacquire */
  +    proc_mutex_no_tryacquire,
       proc_mutex_proc_pthread_release,
       proc_mutex_proc_pthread_cleanup,
       proc_mutex_proc_pthread_child_init,
  @@ -579,7 +583,7 @@
   #endif
       proc_mutex_fcntl_create,
       proc_mutex_fcntl_acquire,
  -    NULL, /* no tryacquire */
  +    proc_mutex_no_tryacquire,
       proc_mutex_fcntl_release,
       proc_mutex_fcntl_cleanup,
       proc_mutex_fcntl_child_init,
  @@ -705,7 +709,7 @@
   #endif
       proc_mutex_flock_create,
       proc_mutex_flock_acquire,
  -    NULL, /* no tryacquire */
  +    proc_mutex_no_tryacquire,
       proc_mutex_flock_release,
       proc_mutex_flock_cleanup,
       proc_mutex_flock_child_init,
  
  
  

Mime
View raw message