diff options
author | Jean-Jacques Clar <clar@apache.org> | 2004-09-02 20:13:32 +0000 |
---|---|---|
committer | Jean-Jacques Clar <clar@apache.org> | 2004-09-02 20:13:32 +0000 |
commit | df6d9b2e3fa068fa645949152a211c2aff48e9bc (patch) | |
tree | 2ed73401b261bde0359150ec1dc55f61cc515b18 | |
parent | 28ca5fb669b58804063f8ee100da48f245415af9 (diff) | |
download | apr-df6d9b2e3fa068fa645949152a211c2aff48e9bc.tar.gz |
Fixed apr_atomic_dec on NetWare to be thread safe
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65324 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | include/apr_atomic.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/apr_atomic.h b/include/apr_atomic.h index fd2bd4e50..a21c4738e 100644 --- a/include/apr_atomic.h +++ b/include/apr_atomic.h @@ -150,8 +150,7 @@ void *apr_atomic_casptr(void **mem, void *with, const void *cmp); inline int apr_atomic_dec(apr_atomic_t *mem) { - atomic_dec(mem); - return *mem; + return (atomic_xchgadd(mem, 0xFFFFFFFF) - 1); } inline void *apr_atomic_casptr(void **mem, void *with, const void *cmp) |