mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d: Add MSVC path for atomic_add_fetch.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
a0ebcce398
commit
f180e95e2f
@ -164,6 +164,9 @@ static inline LONG InterlockedDecrement(LONG volatile *x)
|
|||||||
|
|
||||||
#if HAVE_SYNC_ADD_AND_FETCH
|
#if HAVE_SYNC_ADD_AND_FETCH
|
||||||
# define atomic_add_fetch(ptr, val) __sync_add_and_fetch(ptr, val)
|
# define atomic_add_fetch(ptr, val) __sync_add_and_fetch(ptr, val)
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
/* InterlockedAdd returns value after increment, like add_and_fetch. */
|
||||||
|
# define atomic_add_fetch(ptr, val) InterlockedAdd(ptr, val)
|
||||||
#else
|
#else
|
||||||
# error "atomic_add_fetch() not implemented for this platform"
|
# error "atomic_add_fetch() not implemented for this platform"
|
||||||
#endif /* HAVE_SYNC_ADD_AND_FETCH */
|
#endif /* HAVE_SYNC_ADD_AND_FETCH */
|
||||||
|
Reference in New Issue
Block a user