diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2019-10-01 17:07:45 +0300 |
---|---|---|
committer | Alexandre Julliard <julliard@winehq.org> | 2019-10-01 20:16:20 +0300 |
commit | f180e95e2fabb1a4f99202dc4041b4d37d578035 (patch) | |
tree | ec4b89a6bae7bd49d36af3066b3eae0d94560167 | |
parent | a0ebcce39863a9d72930d0ecffa783782375c8a7 (diff) |
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>
-rw-r--r-- | include/private/vkd3d_common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h index d8fb3613..ac217e9e 100644 --- a/include/private/vkd3d_common.h +++ b/include/private/vkd3d_common.h @@ -164,6 +164,9 @@ static inline LONG InterlockedDecrement(LONG volatile *x) #if HAVE_SYNC_ADD_AND_FETCH # 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 # error "atomic_add_fetch() not implemented for this platform" #endif /* HAVE_SYNC_ADD_AND_FETCH */ |