apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject cvs commit: apr/atomic/unix apr_atomic.c
Date Tue, 19 Mar 2002 22:42:30 GMT
gregames    02/03/19 14:42:30

  Modified:    atomic/unix apr_atomic.c
  Log:
  apr_atomic_dec:  change the fallback version to return the new value of
  the memory variable.
  
  Revision  Changes    Path
  1.11      +3 -3      apr/atomic/unix/apr_atomic.c
  
  Index: apr_atomic.c
  ===================================================================
  RCS file: /home/cvs/apr/atomic/unix/apr_atomic.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- apr_atomic.c	16 Mar 2002 03:54:00 -0000	1.10
  +++ apr_atomic.c	19 Mar 2002 22:42:30 -0000	1.11
  @@ -126,13 +126,13 @@
   int apr_atomic_dec(volatile apr_atomic_t *mem) 
   {
       apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
  -    apr_uint32_t prev;
  +    apr_uint32_t new;
   
       if (apr_thread_mutex_lock(lock) == APR_SUCCESS) {
  -        prev = *mem;
           (*mem)--;
  +        new = *mem;
           apr_thread_mutex_unlock(lock);
  -        return prev; 
  +        return new; 
       }
       return *mem; 
   }
  
  
  

Mime
View raw message