diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2023-04-16 10:10:03 +0000 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2023-04-16 10:10:03 +0000 |
commit | 5e74744dff73214b18323c335da3497d506b69fe (patch) | |
tree | af3b192aeeaa7cd403d66e385db0c7bce38ee8ca | |
parent | 10747fe8136b774b438cdffb7983a04f260127ed (diff) | |
parent | 16074af6a18e708629306a47593ec4b7bd6fe27f (diff) | |
download | cairo-5e74744dff73214b18323c335da3497d506b69fe.tar.gz |
Merge branch 'issue-776' into 'master'
win32: InterlockedCompareExchange uses LONG
Closes #776
See merge request cairo/cairo!472
-rw-r--r-- | src/cairo-atomic-private.h | 8 |
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 * |