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 Fri, 10 Jan 2003 23:29:19 GMT
bnicholes    2003/01/10 15:29:19

  Modified:    .        NWGNUmakefile
               include  apr_atomic.h
  Log:
  Replaced the apr_atomic_dec function and the apr_atomic_casptr macro
  with inline functions for NetWare.
  
  Revision  Changes    Path
  1.12      +0 -5      apr/NWGNUmakefile
  
  Index: NWGNUmakefile
  ===================================================================
  RCS file: /home/cvs/apr/NWGNUmakefile,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- NWGNUmakefile	16 Nov 2002 00:31:43 -0000	1.11
  +++ NWGNUmakefile	10 Jan 2003 23:29:18 -0000	1.12
  @@ -236,7 +236,6 @@
   # Paths must all use the '/' character
   #
   FILES_lib_objs = \
  -	$(OBJDIR)/apr_atomic.o \
   	$(OBJDIR)/apr_cpystrn.o \
   	$(OBJDIR)/apr_fnmatch.o \
   	$(OBJDIR)/apr_getpass.o \
  @@ -315,10 +314,6 @@
   #
   # Any specialized rules here
   #
  -
  -$(OBJDIR)/%.o: atomic/netware/%.c $(OBJDIR)\cc.opt
  -	@echo Compiling $<
  -	$(CC) atomic\netware\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
   
   $(OBJDIR)/%.o: strings/%.c $(OBJDIR)\cc.opt
   	@echo Compiling $<
  
  
  
  1.45      +16 -4     apr/include/apr_atomic.h
  
  Index: apr_atomic.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_atomic.h,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- apr_atomic.h	9 Jan 2003 02:48:46 -0000	1.44
  +++ apr_atomic.h	10 Jan 2003 23:29:18 -0000	1.45
  @@ -173,15 +173,27 @@
   #define apr_atomic_t unsigned long
   
   #define apr_atomic_add(mem, val)     atomic_add(mem,val)
  -APR_DECLARE(int) apr_atomic_dec(apr_atomic_t *mem);
  -#define APR_OVERRIDE_ATOMIC_DEC 1
  -#define APR_OVERRIDE_ATOMIC_CASPTR 1
   #define apr_atomic_inc(mem)          atomic_inc(mem)
   #define apr_atomic_set(mem, val)     (*mem = val)
   #define apr_atomic_read(mem)         (*mem)
   #define apr_atomic_init(pool)        APR_SUCCESS
   #define apr_atomic_cas(mem,with,cmp) atomic_cmpxchg((unsigned long *)(mem),(unsigned long)(cmp),(unsigned
long)(with))
  -#define apr_atomic_casptr(mem,with,cmp) (void*)atomic_cmpxchg((unsigned long *)(mem),(unsigned
long)(cmp),(unsigned long)(with))
  +    
  +int apr_atomic_dec(apr_atomic_t *mem);
  +void *apr_atomic_casptr(void **mem, void *with, const void *cmp);
  +#define APR_OVERRIDE_ATOMIC_DEC 1
  +#define APR_OVERRIDE_ATOMIC_CASPTR 1
  +
  +inline int apr_atomic_dec(apr_atomic_t *mem) 
  +{
  +    atomic_dec(mem);
  +    return *mem; 
  +}
  +
  +inline void *apr_atomic_casptr(void **mem, void *with, const void *cmp)
  +{
  +    return (void*)atomic_cmpxchg((unsigned long *)mem,(unsigned long)cmp,(unsigned long)with);
  +}
   
   #elif defined(__FreeBSD__)
   
  
  
  

Mime
View raw message