Browse Source

atomics: Fix the win32 atomic_exchange function

This fixes building with MSVC after
a2a38b1606.

Remove the stray semicolon, and add casts for the input argument
(which is an intptr_t*) to the right type (PVOID volatile *).

Signed-off-by: Martin Storsjö <martin@martin.st>
master
Martin Storsjö 4 years ago
parent
commit
b1b7cc698b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      compat/atomics/win32/stdatomic.h

+ 1
- 1
compat/atomics/win32/stdatomic.h View File

@@ -96,7 +96,7 @@ do { \
atomic_load(object)

#define atomic_exchange(object, desired) \
InterlockedExchangePointer(object, desired);
InterlockedExchangePointer((PVOID volatile *)object, (PVOID)desired)

#define atomic_exchange_explicit(object, desired, order) \
atomic_exchange(object, desired)


Loading…
Cancel
Save