Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Gramner <gramner@twoorioles.com>2021-09-03 19:51:37 +0300
committerHenrik Gramner <henrik@gramner.com>2021-09-03 19:54:59 +0300
commit2d633652f81be04d22a68f19e8430a64af3e045b (patch)
tree8fd0e25601a5774af14d7499cd9cf0a30e76fe54 /include
parent753eef833bdd8ff1585c5c858cafeca8fefbb16e (diff)
msvc: Add compat macros for additional atomic operations
Diffstat (limited to 'include')
-rw-r--r--include/compat/msvc/stdatomic.h2
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 */