From b297bfdd47b0a39831d8cc2541aeb910f9af0bca Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 3 Dec 2010 10:57:26 +0100 Subject: Introduce ethr_sint_t and use it for atomics The atomic memory operations interface used the 'long' type and assumed that it was of the same size as 'void *'. This is true on most platforms, however, not on Windows 64. --- erts/lib_src/pthread/ethr_event.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'erts/lib_src/pthread/ethr_event.c') diff --git a/erts/lib_src/pthread/ethr_event.c b/erts/lib_src/pthread/ethr_event.c index 6731c0eb46..ae1d827731 100644 --- a/erts/lib_src/pthread/ethr_event.c +++ b/erts/lib_src/pthread/ethr_event.c @@ -24,6 +24,10 @@ #define ETHR_INLINE_FUNC_NAME_(X) X ## __ #define ETHR_EVENT_IMPL__ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "ethread.h" #if defined(ETHR_LINUX_FUTEX_IMPL__) @@ -52,7 +56,7 @@ wait__(ethr_event *e, int spincount) { unsigned sc = spincount; int res; - long val; + ethr_sint_t val; int until_yield = ETHR_YIELD_AFTER_BUSY_LOOPS; if (spincount < 0) @@ -131,7 +135,7 @@ static ETHR_INLINE int wait__(ethr_event *e, int spincount) { int sc = spincount; - long val; + ethr_sint_t val; int res, ulres; int until_yield = ETHR_YIELD_AFTER_BUSY_LOOPS; -- cgit v1.2.3