apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject cvs commit: apr/include apr_atomic.h
Date Mon, 18 Feb 2002 06:24:13 GMT
ianh        02/02/17 22:24:13

  Modified:    include  apr_atomic.h
  Log:
  use FreeBSD (4+) atomic functions instead of generic ones
  
  Revision  Changes    Path
  1.6       +12 -0     apr/include/apr_atomic.h
  
  Index: apr_atomic.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_atomic.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- apr_atomic.h	17 Feb 2002 19:54:03 -0000	1.5
  +++ apr_atomic.h	18 Feb 2002 06:24:13 -0000	1.6
  @@ -87,6 +87,18 @@
   #define apr_atomic_read(mem)         atomic_read(mem)
   #define apr_atomic_init(pool)        APR_SUCCESS
   
  +#elif defined(__FreeBSD__) && (__FreeBSD__ >= 4)
  +#include <machine/atomic.h>
  +
  +#define apr_atomic_t apr_uint32_t
  +#define apr_atomic_add(mem, val)     atomic_add_int(mem,val)
  +#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_init(pool)        APR_SUCCESS
  +
  +
   #elif defined(__sparc__not_ready_yet)
   #define apr_atomic_t apr_uint32_t
   #define apr_atomic_read(p)  *p
  
  
  

Mime
View raw message