mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-23 07:42:51 +00:00
Merge commit '6a93b596c5c3af31b843d63013a7985ffeea354d'
* commit '6a93b596c5c3af31b843d63013a7985ffeea354d': compat/atomics: add typecasts in atomic_compare_exchange_strong() Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
eab5d29810
@ -108,7 +108,7 @@ static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *exp
|
|||||||
intptr_t desired)
|
intptr_t desired)
|
||||||
{
|
{
|
||||||
intptr_t old = *expected;
|
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;
|
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 desired)
|
||||||
{
|
{
|
||||||
intptr_t old = *expected;
|
intptr_t old = *expected;
|
||||||
*expected = InterlockedCompareExchangePointer(object, desired, old);
|
*expected = (intptr_t)InterlockedCompareExchangePointer(
|
||||||
|
(PVOID *)object, (PVOID)desired, (PVOID)old);
|
||||||
return *expected == old;
|
return *expected == old;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user