apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr/atomic/unix apr_atomic.c
Date Thu, 18 Apr 2002 17:15:27 GMT
jerenkrantz    02/04/18 10:15:27

  Modified:    .        CHANGES
               atomic/unix apr_atomic.c
  Log:
  Ensure that the ATOMIC_HASH can not be negative.
  
  Submitted by:   Joe Orton <jorton@redhat.com>
  Reviewed by:    Justin Erenkrantz
  
  Revision  Changes    Path
  1.260     +3 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.259
  retrieving revision 1.260
  diff -u -r1.259 -r1.260
  --- CHANGES	18 Apr 2002 14:24:16 -0000	1.259
  +++ CHANGES	18 Apr 2002 17:15:27 -0000	1.260
  @@ -1,5 +1,8 @@
   Changes with APR b1
   
  +  *) Ensure that the ATOMIC_HASH can not be negative.
  +     [Joe Orton <jorton@redhat.com>]
  +
     *) Fix a problem with eof reporting with Unix file I/O on 
        unbuffered files.  [Stas Bekman <stas@stason.org>]
   
  
  
  
  1.13      +1 -2      apr/atomic/unix/apr_atomic.c
  
  Index: apr_atomic.c
  ===================================================================
  RCS file: /home/cvs/apr/atomic/unix/apr_atomic.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- apr_atomic.c	9 Apr 2002 06:56:55 -0000	1.12
  +++ apr_atomic.c	18 Apr 2002 17:15:27 -0000	1.13
  @@ -63,7 +63,7 @@
   
   #define NUM_ATOMIC_HASH 7
   /* shift by 2 to get rid of alignment issues */
  -#define ATOMIC_HASH(x) (int)(((long)x>>2)%NUM_ATOMIC_HASH)
  +#define ATOMIC_HASH(x) (unsigned int)(((unsigned long)(x))%(unsigned int)NUM_ATOMIC_HASH)
   static apr_thread_mutex_t **hash_mutex;
   
   apr_status_t apr_atomic_init(apr_pool_t *p )
  @@ -92,7 +92,6 @@
           apr_thread_mutex_unlock(lock);
   /*        return prev; */
       }
  -    printf("debug no workee\n");
   /*    return *mem; */
   }
   void apr_atomic_set(volatile apr_atomic_t *mem, apr_uint32_t val) 
  
  
  

Mime
View raw message