apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr/include apr_atomic.h
Date Tue, 30 Sep 2003 18:55:00 GMT
bnicholes    2003/09/30 11:55:00

  Modified:    include  apr_atomic.h
  Log:
  Make sure that the types are correct when the native NetWare atomic API's
  are called
  
  Revision  Changes    Path
  1.58      +7 -9      apr/include/apr_atomic.h
  
  Index: apr_atomic.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_atomic.h,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- apr_atomic.h	29 Sep 2003 16:10:00 -0000	1.57
  +++ apr_atomic.h	30 Sep 2003 18:55:00 -0000	1.58
  @@ -248,18 +248,16 @@
   
   #elif defined(NETWARE)
   
  -#define apr_atomic_t unsigned long
  -
   #define apr_atomic_init(pool)           APR_SUCCESS
  -#define apr_atomic_add32(mem, val)      atomic_add(mem,val)
  -#define apr_atomic_sub32(mem, val)      atomic_sub(mem,val)
  -#define apr_atomic_inc32(mem)           atomic_inc(mem)
  +#define apr_atomic_add32(mem, val)      atomic_add((unsigned long *)(mem),(unsigned long)(val))
  +#define apr_atomic_sub32(mem, val)      atomic_sub((unsigned long *)(mem),(unsigned long)(val))
  +#define apr_atomic_inc32(mem)           atomic_inc((unsigned long *)(mem))
   #define apr_atomic_set32(mem, val)      (*mem = val)
   #define apr_atomic_read32(mem)          (*mem)
   #define apr_atomic_cas32(mem,with,cmp)  atomic_cmpxchg((unsigned long *)(mem),(unsigned
long)(cmp),(unsigned long)(with))
  -#define apr_atomic_xchg32(mem, val)     atomic_xchg(mem, val)
  +#define apr_atomic_xchg32(mem, val)     atomic_xchg((unsigned long *)(mem),(unsigned long)val)
       
  -int apr_atomic_dec32(apr_atomic_t *mem);
  +int apr_atomic_dec32(apr_uint32_t *mem);
   void *apr_atomic_casptr(void **mem, void *with, const void *cmp);
   
   #define APR_OVERRIDE_ATOMIC_READ32  1
  @@ -273,9 +271,9 @@
   
   #define APR_OVERRIDE_ATOMIC_CASPTR 1
   
  -inline int apr_atomic_dec32(apr_atomic_t *mem) 
  +inline int apr_atomic_dec32(apr_uint32_t *mem) 
   {
  -    atomic_dec(mem);
  +    atomic_dec((unsigned long *)mem);
       return *mem; 
   }
   
  
  
  

Mime
View raw message