apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr/include apr_atomic.h
Date Tue, 30 Apr 2002 23:45:27 GMT
jerenkrantz    02/04/30 16:45:27

  Modified:    include  apr_atomic.h
  Log:
  Make the () style consistent for read and set macros.  This should resolve
  potential problems using complicated expressions in read/set.
  
  Revision  Changes    Path
  1.25      +5 -5      apr/include/apr_atomic.h
  
  Index: apr_atomic.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_atomic.h,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- apr_atomic.h	30 Apr 2002 23:43:28 -0000	1.24
  +++ apr_atomic.h	30 Apr 2002 23:45:27 -0000	1.25
  @@ -150,7 +150,7 @@
   #define apr_atomic_dec(mem)          InterlockedDecrement(mem)
   #define apr_atomic_inc(mem)          InterlockedIncrement(mem)
   #define apr_atomic_set(mem, val)     InterlockedExchange(mem, val)
  -#define apr_atomic_read(mem)         *mem
  +#define apr_atomic_read(mem)         (*mem)
   #define apr_atomic_cas(mem,with,cmp) InterlockedCompareExchange(mem,with,cmp)
   #define apr_atomic_init(pool)        APR_SUCCESS
   
  @@ -179,7 +179,7 @@
   #define apr_atomic_dec(mem)          atomic_subtract_int(mem,1)
   #define apr_atomic_inc(mem)          atomic_add_int(mem,1)
   #define apr_atomic_set(mem, val)     atomic_set_int(mem, val)
  -#define apr_atomic_read(mem)         *mem
  +#define apr_atomic_read(mem)         (*mem)
   
   #define APR_ATOMIC_NEED_CAS_DEFAULT 1
   
  @@ -191,7 +191,7 @@
   #define apr_atomic_dec(mem)          apr_atomic_sub_sparc(mem,1)
   #define apr_atomic_inc(mem)          apr_atomic_add_sparc(mem,1)
   #define apr_atomic_cas(mem,val,cond) apr_atomic_cas_sparc(mem,val,cond)
  -#define apr_atomic_set(mem, val)     *mem= val
  +#define apr_atomic_set(mem, val)     (*mem = val)
   #define apr_atomic_init(pool)        APR_SUCCESS
   
   apr_uint32_t apr_atomic_add_sparc(volatile apr_atomic_t *mem, apr_uint32_t add);
  @@ -219,8 +219,8 @@
    * variables with other apr_atomic_* operations on OS/390.
    */
   
  -#define apr_atomic_read(p)           *p
  -#define apr_atomic_set(mem, val)     *mem= val
  +#define apr_atomic_read(p)           (*p)
  +#define apr_atomic_set(mem, val)     (*mem = val)
   
   #else
   #if APR_HAS_THREADS
  
  
  

Mime
View raw message