diff options
author | Rickard Green <[email protected]> | 2010-12-03 10:57:26 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2010-12-11 03:03:19 +0100 |
commit | b297bfdd47b0a39831d8cc2541aeb910f9af0bca (patch) | |
tree | 59ac65b0d0bc95879d9507900781acdc4911bc3b /erts/include/internal/tile/atomic.h | |
parent | 99e34bba1a60b262e24496cc9288b549360c6377 (diff) | |
download | otp-b297bfdd47b0a39831d8cc2541aeb910f9af0bca.tar.gz otp-b297bfdd47b0a39831d8cc2541aeb910f9af0bca.tar.bz2 otp-b297bfdd47b0a39831d8cc2541aeb910f9af0bca.zip |
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.
Diffstat (limited to 'erts/include/internal/tile/atomic.h')
-rw-r--r-- | erts/include/internal/tile/atomic.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/erts/include/internal/tile/atomic.h b/erts/include/internal/tile/atomic.h index 69569d82d1..05246a2aa9 100644 --- a/erts/include/internal/tile/atomic.h +++ b/erts/include/internal/tile/atomic.h @@ -26,6 +26,10 @@ #include <atomic.h> +#if ETHR_SIZEOF_LONG != ETHR_SIZEOF_PTR +# error "Incompatible size of 'long'" +#endif + /* An atomic is an aligned int accessed via locked operations. */ typedef struct { |