apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwool...@apache.org
Subject cvs commit: apr/locks/unix locks.c
Date Mon, 02 Jul 2001 01:39:12 GMT
jwoolley    01/07/01 18:39:11

  Modified:    include  apr_portable.h
               locks/unix locks.c
  Log:
  Fix warnings on Solaris 2.6 about assigning from pointer to
  int and vice versa with APR_USE_PROC_PTHREAD_SERIALIZE.
  
  Submitted by:	Ryan Bloom
  
  Revision  Changes    Path
  1.59      +4 -9      apr/include/apr_portable.h
  
  Index: apr_portable.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_portable.h,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -d -u -r1.58 -r1.59
  --- apr_portable.h	2001/06/14 18:51:50	1.58
  +++ apr_portable.h	2001/07/02 01:39:07	1.59
  @@ -150,16 +150,11 @@
   #endif
   
   struct apr_os_lock_t {
  -#if APR_USE_SYSVSEM_SERIALIZE
  -    int crossproc;
  -#elif APR_USE_FCNTL_SERIALIZE
  -    int crossproc;
  -#elif APR_USE_PROC_PTHREAD_SERIALIZE
  -    pthread_mutex_t *crossproc; 
  -#elif APR_USE_FLOCK_SERIALIZE
  +#if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE
       int crossproc;
  -#else
  -    /* No Interprocess serialization, too bad. */
  +#endif
  +#if APR_HAS_PROC_PTHREAD_SERIALIZE
  +    pthread_mutex_t *pthread_interproc;
   #endif
   #if APR_HAS_THREADS
       /* If no threads, no need for thread locks */
  
  
  
  1.59      +10 -1     apr/locks/unix/locks.c
  
  Index: locks.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/unix/locks.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -d -u -r1.58 -r1.59
  --- locks.c	2001/07/01 03:41:35	1.58
  +++ locks.c	2001/07/02 01:39:10	1.59
  @@ -341,7 +341,12 @@
   
   apr_status_t apr_os_lock_get(apr_os_lock_t *oslock, apr_lock_t *lock)
   {
  +#if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE
       oslock->crossproc = lock->interproc;
  +#endif
  +#if APR_HAS_PROC_PTHREAD_SERIALIZE
  +    oslock->pthread_interproc = lock->pthread_interproc;
  +#endif
   #if APR_HAS_THREADS
   #if APR_USE_PTHREAD_SERIALIZE
       oslock->intraproc = lock->intraproc;
  @@ -361,8 +366,12 @@
           (*lock) = (apr_lock_t *)apr_pcalloc(pool, sizeof(apr_lock_t));
           (*lock)->pool = pool;
       }
  -    /* XXX handle setting of handle for PROC_PTHREAD_SERIALIZE here */
  +#if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE
       (*lock)->interproc = thelock->crossproc;
  +#endif
  +#if APR_HAS_PROC_PTHREAD_SERIALIZE
  +    (*lock)->pthread_interproc = thelock->pthread_interproc;
  +#endif
   #if APR_HAS_THREADS
   #if (APR_USE_PTHREAD_SERIALIZE)
       (*lock)->intraproc = thelock->intraproc;
  
  
  

Mime
View raw message