summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2023-04-12 20:30:57 +0930
committerAdrian Johnson <ajohnson@redneon.com>2023-04-13 06:03:22 +0930
commit16074af6a18e708629306a47593ec4b7bd6fe27f (patch)
tree89d645b525575595c0d09584545c3034a2390c72
parentec14ec47f76b7537260034034bc44454de6e47c1 (diff)
downloadcairo-16074af6a18e708629306a47593ec4b7bd6fe27f.tar.gz
win32: InterlockedCompareExchange uses LONG
Fixes #776
-rw-r--r--src/cairo-atomic-private.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-atomic-private.h b/src/cairo-atomic-private.h
index 727f97c75..89556ef7f 100644
--- a/src/cairo-atomic-private.h
+++ b/src/cairo-atomic-private.h
@@ -304,16 +304,16 @@ _cairo_atomic_int_get (cairo_atomic_int_t *x)
# define _cairo_atomic_int_get_relaxed(x) *(x)
# define _cairo_atomic_int_set_relaxed(x, val) *(x) = (val)
-# define _cairo_atomic_int_inc(x) ((void) InterlockedIncrement (x))
-# define _cairo_atomic_int_dec(x) ((void) InterlockedDecrement (x))
-# define _cairo_atomic_int_dec_and_test(x) (InterlockedDecrement (x) == 0)
+# define _cairo_atomic_int_inc(x) ((void) InterlockedIncrement ((LONG*)x))
+# define _cairo_atomic_int_dec(x) ((void) InterlockedDecrement ((LONG*)x))
+# define _cairo_atomic_int_dec_and_test(x) (InterlockedDecrement ((LONG*)x) == 0)
static cairo_always_inline cairo_bool_t
_cairo_atomic_int_cmpxchg (cairo_atomic_int_t *x,
cairo_atomic_int_t oldv,
cairo_atomic_int_t newv)
{
- return InterlockedCompareExchange ((unsigned int*)x, (unsigned int)newv, (unsigned int)oldv) == oldv;
+ return InterlockedCompareExchange ((LONG*)x, (LONG)newv, (LONG)oldv) == oldv;
}
static cairo_always_inline void *