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/include/internal/sparc32/atomic.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'erts/include/internal/sparc32') diff --git a/erts/include/internal/sparc32/atomic.h b/erts/include/internal/sparc32/atomic.h index 2da6472393..8d94fa939f 100644 --- a/erts/include/internal/sparc32/atomic.h +++ b/erts/include/internal/sparc32/atomic.h @@ -24,6 +24,10 @@ #ifndef ETHR_SPARC32_ATOMIC_H #define ETHR_SPARC32_ATOMIC_H +#if ETHR_SIZEOF_LONG != ETHR_SIZEOF_PTR +# error "Incompatible size of 'long'" +#endif + typedef struct { volatile long counter; } ethr_native_atomic_t; -- cgit v1.2.3