21 #if !defined(__TBB_machine_H) || defined(__TBB_machine_windows_intel64_H) 22 #error Do not #include this internal file directly; use public TBB headers instead. 25 #define __TBB_machine_windows_intel64_H 27 #define __TBB_WORDSIZE 8 28 #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE 30 #include "msvc_ia32_common.h" 32 #ifndef __TBB_ATOMIC_PRIMITIVES_DEFINED 35 #pragma intrinsic(_InterlockedCompareExchange,_InterlockedExchangeAdd,_InterlockedExchange) 36 #pragma intrinsic(_InterlockedCompareExchange64,_InterlockedExchangeAdd64,_InterlockedExchange64) 41 __int8 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp1 (
volatile void *ptr, __int8 value, __int8 comparand );
42 __int8 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd1 (
volatile void *ptr, __int8 addend );
43 __int8 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore1 (
volatile void *ptr, __int8 value );
44 __int16 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp2 (
volatile void *ptr, __int16 value, __int16 comparand );
45 __int16 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd2 (
volatile void *ptr, __int16 addend );
46 __int16 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore2 (
volatile void *ptr, __int16 value );
49 inline long __TBB_machine_cmpswp4 (
volatile void *ptr, __int32 value, __int32 comparand ) {
50 return _InterlockedCompareExchange( (
long*)ptr, value, comparand );
52 inline long __TBB_machine_fetchadd4 (
volatile void *ptr, __int32 addend ) {
53 return _InterlockedExchangeAdd( (
long*)ptr, addend );
55 inline long __TBB_machine_fetchstore4 (
volatile void *ptr, __int32 value ) {
56 return _InterlockedExchange( (
long*)ptr, value );
59 inline __int64 __TBB_machine_cmpswp8 (
volatile void *ptr, __int64 value, __int64 comparand ) {
60 return _InterlockedCompareExchange64( (__int64*)ptr, value, comparand );
62 inline __int64 __TBB_machine_fetchadd8 (
volatile void *ptr, __int64 addend ) {
63 return _InterlockedExchangeAdd64( (__int64*)ptr, addend );
65 inline __int64 __TBB_machine_fetchstore8 (
volatile void *ptr, __int64 value ) {
66 return _InterlockedExchange64( (__int64*)ptr, value );
71 #define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1 72 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 73 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 74 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1