You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2002/02/13 02:22:18 UTC

cvs commit: apr/atomic/unix apr_atomic.c

trawick     02/02/12 17:22:18

  Modified:    include  apr_atomic.h
               atomic/unix apr_atomic.c
  Log:
  get APR to build with --disable-threads... there is no
  implementation of apr atomic stuff for Unix unless
  APR_HAS_THREADS
  
  Revision  Changes    Path
  1.2       +5 -0      apr/include/apr_atomic.h
  
  Index: apr_atomic.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_atomic.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_atomic.h	12 Feb 2002 21:49:15 -0000	1.1
  +++ apr_atomic.h	13 Feb 2002 01:22:18 -0000	1.2
  @@ -73,6 +73,9 @@
   #define apr_atomic_init(pool)        APR_SUCCESS
   
   #else
  +
  +#if APR_HAS_THREADS
  +
   #define apr_atomic_read(p)  *p
   apr_status_t apr_atomic_init(apr_pool_t *p);
   long apr_atomic_set(volatile long*mem, long val);
  @@ -80,6 +83,8 @@
   long apr_atomic_inc( volatile long *mem);
   long apr_atomic_dec(volatile long *mem);
   long apr_atomic_cas(volatile long *mem,long with,long cmp);
  +
  +#endif /* APR_HAS_THREADS */
   
   #endif
   #ifdef __cplusplus
  
  
  
  1.2       +5 -0      apr/atomic/unix/apr_atomic.c
  
  Index: apr_atomic.c
  ===================================================================
  RCS file: /home/cvs/apr/atomic/unix/apr_atomic.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_atomic.c	12 Feb 2002 21:49:15 -0000	1.1
  +++ apr_atomic.c	13 Feb 2002 01:22:18 -0000	1.2
  @@ -7,6 +7,8 @@
   /* win32 implementation is all macros */
   #else
   
  +#if APR_HAS_THREADS
  +
   #define NUM_ATOMIC_HASH 7
   /* shift by 2 to get rid of alignment issues */
   #define ATOMIC_HASH(x) (int)(((long)x>>2)%NUM_ATOMIC_HASH)
  @@ -92,4 +94,7 @@
       }
       return *mem;
   }
  +
  +#endif /* APR_HAS_THREADS */
  +
   #endif /* default implementation */