diff options
author | Yann Ylavic <ylavic@apache.org> | 2022-06-26 12:29:35 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2022-06-26 12:29:35 +0000 |
commit | e3c01e2f29651007d86d63047c58c1bf4405a9f5 (patch) | |
tree | 3342de7bdaf52bb486e712456a411449ca240378 | |
parent | e78d576c68eb2ffd517a9508ae2db4aa02f78a0f (diff) | |
download | apr-e3c01e2f29651007d86d63047c58c1bf4405a9f5.tar.gz |
atomic: Follow up r1902257: No cast for InterlockedCompareExchangePointer().
Both 32 and 64 bit InterlockedCompareExchangePointer() seem to have the same
API, so be it..
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902259 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | atomic/win32/apr_atomic.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/atomic/win32/apr_atomic.c b/atomic/win32/apr_atomic.c index ba48589b7..3bd42f7f5 100644 --- a/atomic/win32/apr_atomic.c +++ b/atomic/win32/apr_atomic.c @@ -91,15 +91,6 @@ APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint3 #endif } -APR_DECLARE(void *) apr_atomic_casptr(void *volatile *mem, void *with, const void *cmp) -{ -#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED) - return InterlockedCompareExchangePointer(mem, with, (void*)cmp); -#else - return InterlockedCompareExchangePointer((long volatile *)mem, with, (void*)cmp); -#endif -} - APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val) { #if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED) @@ -109,6 +100,11 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint #endif } +APR_DECLARE(void *) apr_atomic_casptr(void *volatile *mem, void *with, const void *cmp) +{ + return InterlockedCompareExchangePointer(mem, with, (void*)cmp); +} + APR_DECLARE(void*) apr_atomic_xchgptr(void *volatile *mem, void *with) { return InterlockedExchangePointer(mem, with); |