apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr/atomic/netware apr_atomic.c
Date Thu, 04 Dec 2003 21:44:33 GMT
bnicholes    2003/12/04 13:44:33

  Modified:    atomic/netware apr_atomic.c
  Log:
  Fix up the return values for apr_atomic_add32() and apr_atomic_inc32() since the native
Netware functions return void by default
  
  Revision  Changes    Path
  1.8       +6 -2      apr/atomic/netware/apr_atomic.c
  
  Index: apr_atomic.c
  ===================================================================
  RCS file: /home/cvs/apr/atomic/netware/apr_atomic.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apr_atomic.c	4 Dec 2003 20:06:03 -0000	1.7
  +++ apr_atomic.c	4 Dec 2003 21:44:33 -0000	1.8
  @@ -64,7 +64,9 @@
   
   APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
   {
  -    return atomic_add((unsigned long *)mem,(unsigned long)val);
  +    apr_uint32_t old = *mem;
  +    atomic_add((unsigned long *)mem,(unsigned long)val);
  +    return old;
   }
   
   APR_DECLARE(void) apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
  @@ -74,7 +76,9 @@
   
   APR_DECLARE(apr_uint32_t) apr_atomic_inc32(volatile apr_uint32_t *mem)
   {
  -    return atomic_inc((unsigned long *)mem);
  +    apr_uint32_t old = *mem;
  +    atomic_inc((unsigned long *)mem);
  +    return old;
   }
   
   APR_DECLARE(void) apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
  
  
  

Mime
View raw message