diff options
-rw-r--r-- | include/compat/msvc/stdatomic.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/compat/msvc/stdatomic.h b/include/compat/msvc/stdatomic.h index 979ee2b..b739d6a 100644 --- a/include/compat/msvc/stdatomic.h +++ b/include/compat/msvc/stdatomic.h @@ -52,6 +52,7 @@ typedef enum { #define atomic_init(p_a, v) do { *(p_a) = (v); } while(0) #define atomic_store(p_a, v) InterlockedExchange((LONG*)p_a, v) #define atomic_load(p_a) InterlockedCompareExchange((LONG*)p_a, 0, 0) +#define atomic_exchange(p_a, v) InterlockedExchange(p_a, v) #define atomic_load_explicit(p_a, mo) atomic_load(p_a) /* @@ -60,6 +61,7 @@ typedef enum { */ #define atomic_fetch_add(p_a, inc) InterlockedExchangeAdd(p_a, inc) #define atomic_fetch_sub(p_a, dec) InterlockedExchangeAdd(p_a, -(dec)) +#define atomic_fetch_or(p_a, v) InterlockedOr(p_a, v) #endif /* ! stdatomic.h */ |