You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by cl...@apache.org on 2004/09/02 22:48:06 UTC
cvs commit: apr/atomic/netware apr_atomic.c
clar 2004/09/02 13:48:06
Modified: atomic/netware apr_atomic.c
Log:
Fixed apr_atomic_dec on NetWare to be thread safe
Revision Changes Path
1.11 +1 -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.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- apr_atomic.c 13 Feb 2004 09:38:23 -0000 1.10
+++ apr_atomic.c 2 Sep 2004 20:48:05 -0000 1.11
@@ -60,8 +60,7 @@
APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
{
- atomic_dec((unsigned long *)mem);
- return *mem;
+ return (atomic_xchgadd((unsigned long *)mem, 0xFFFFFFFF) - 1);
}
APR_DECLARE(void *) apr_atomic_casptr(volatile void **mem, void *with, const void *cmp)