Commit eab5d298 authored by James Almer's avatar James Almer

Merge commit '6a93b596'

* commit '6a93b596':
  compat/atomics: add typecasts in atomic_compare_exchange_strong()
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents 657c0720 6a93b596
......@@ -108,7 +108,7 @@ static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *exp
intptr_t desired)
{
intptr_t old = *expected;
*expected = atomic_cas_ptr(object, old, desired);
*expected = (intptr_t)atomic_cas_ptr(object, (void *)old, (void *)desired);
return *expected == old;
}
......
......@@ -105,7 +105,8 @@ static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *exp
intptr_t desired)
{
intptr_t old = *expected;
*expected = InterlockedCompareExchangePointer(object, desired, old);
*expected = (intptr_t)InterlockedCompareExchangePointer(
(PVOID *)object, (PVOID)desired, (PVOID)old);
return *expected == old;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment