From e1de86eac188e804c6737fcad66ae09cf25ef221 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 8 Aug 2018 22:42:33 -0700 Subject: [PATCH] [atomic] Change Windows atomic int type to int --- src/hb-atomic-private.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index aedfe9b5b..f62cfbd6c 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -101,8 +101,8 @@ static inline void _hb_memory_barrier (void) } #define _hb_memory_barrier() _hb_memory_barrier () -typedef LONG hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) InterlockedExchangeAdd ((AI), (V)) +typedef int hb_atomic_int_impl_t; +#define hb_atomic_int_impl_add(AI, V) InterlockedExchangeAdd ((unsigned *) (AI), (V)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) (InterlockedCompareExchangePointer ((void **) (P), (void *) (N), (void *) (O)) == (void *) (O))