From e3c01e2f29651007d86d63047c58c1bf4405a9f5 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Sun, 26 Jun 2022 12:29:35 +0000 Subject: 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 --- atomic/win32/apr_atomic.c | 14 +++++--------- 1 file 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); -- cgit v1.2.1