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

Showing the changes to compat (1 of 1 file). Show all

Unified · Split

compat/atomics/win32/stdatomic.h+1−1
@@ -96,7 +96,7 @@ do { \ · 95 unmodified lines
9696 atomic_load(object)
9797
9898 #define atomic_exchange(object, desired) \
99− InterlockedExchangePointer(object, desired);
99+ InterlockedExchangePointer((PVOID volatile *)object, (PVOID)desired)
100100
101101 #define atomic_exchange_explicit(object, desired, order) \
102102 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