summaryrefslogtreecommitdiff
path: root/atomic
diff options
context:
space:
mode:
authorclar <clar@13f79535-47bb-0310-9956-ffa450edef68>2004-09-02 20:48:05 +0000
committerclar <clar@13f79535-47bb-0310-9956-ffa450edef68>2004-09-02 20:48:05 +0000
commit55bf521e9bf8ffcbeb263ec59560c49f5a755edd (patch)
tree88441520bf68f5affaea91b085a6959500b67997 /atomic
parentb5984757c59a78bb45f871f53b16878478c649fb (diff)
downloadlibapr-55bf521e9bf8ffcbeb263ec59560c49f5a755edd.tar.gz
Fixed apr_atomic_dec on NetWare to be thread safe
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65325 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'atomic')
-rw-r--r--atomic/netware/apr_atomic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/atomic/netware/apr_atomic.c b/atomic/netware/apr_atomic.c
index 17ffe14d5..069b1bd16 100644
--- a/atomic/netware/apr_atomic.c
+++ b/atomic/netware/apr_atomic.c
@@ -60,8 +60,7 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint
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)