From 165f5ba45e128252a677facf82a6e4c1cb3f272d Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 10 Dec 2010 16:52:27 +0100 Subject: Add support for 64-bit atomics on Windows --- erts/include/internal/ethread.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'erts/include/internal/ethread.h') diff --git a/erts/include/internal/ethread.h b/erts/include/internal/ethread.h index c32ea42a92..84554d2d77 100644 --- a/erts/include/internal/ethread.h +++ b/erts/include/internal/ethread.h @@ -167,14 +167,20 @@ typedef pthread_key_t ethr_tsd_key; #endif #if defined(_MSC_VER) -#if ETHR_SIZEOF_PTR == 4 + #define ETHR_HAVE_INT_T 1 -typedef LONG ethr_sint_t; -typedef ULONG ethr_uint_t; +#if ETHR_SIZEOF_LONG == ETHR_SIZEOF_PTR +typedef long ethr_sint_t; +typedef unsigned long ethr_uint_t; +#elif ETHR_SIZEOF___INT64 == ETHR_SIZEOF_PTR +typedef __int64 ethr_sint_t; +typedef unsigned __int64 ethr_uint_t; #else -#error "Only 32-bit windows is supported" +#error "No integer type of the same size as pointers found" #endif + #endif + struct ethr_join_data_; /* Types */ -- cgit v1.2.3