History

atomics: Fix the win32 atomic_exchange function

This fixes building with MSVC after a2a38b160620d91bc3f895dadc4501c589998b9c. Remove the stray semicolon, and add casts for the input argument (which is an intptr_t*) to the right type (PVOID volatile *).

Martin Storsjö committed 5 years ago

Commit b1b7cc61 parent 18dcbb01 file · +1 −1Browse files

Unified · Split

compat/atomics/win32/stdatomic.h+1−1
@@ -96,7 +96,7 @@ do { \ · 95 unmodified lines
96 atomic_load(object)96 atomic_load(object)
97 97
98#define atomic_exchange(object, desired) \98#define atomic_exchange(object, desired) \
99 InterlockedExchangePointer(object, desired);99 InterlockedExchangePointer((PVOID volatile *)object, (PVOID)desired)
100 100
101#define atomic_exchange_explicit(object, desired, order) \101#define atomic_exchange_explicit(object, desired, order) \
102 atomic_exchange(object, desired)102 atomic_exchange(object, desired)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t