You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2022/06/26 12:29:35 UTC
svn commit: r1902259 - /apr/apr/trunk/atomic/win32/apr_atomic.c
Author: ylavic
Date: Sun Jun 26 12:29:35 2022
New Revision: 1902259
URL: http://svn.apache.org/viewvc?rev=1902259&view=rev
Log:
atomic: Follow up r1902257: No cast for InterlockedCompareExchangePointer().
Both 32 and 64 bit InterlockedCompareExchangePointer() seem to have the same
API, so be it..
Modified:
apr/apr/trunk/atomic/win32/apr_atomic.c
Modified: apr/apr/trunk/atomic/win32/apr_atomic.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/atomic/win32/apr_atomic.c?rev=1902259&r1=1902258&r2=1902259&view=diff
==============================================================================
--- apr/apr/trunk/atomic/win32/apr_atomic.c (original)
+++ apr/apr/trunk/atomic/win32/apr_atomic.c Sun Jun 26 12:29:35 2022
@@ -91,15 +91,6 @@ APR_DECLARE(apr_uint32_t) apr_atomic_cas
#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_xch
#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);