Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
windows_intel64.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005-2020 Intel Corporation
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 
17 #if !defined(__TBB_machine_H) || defined(__TBB_machine_windows_intel64_H)
18 #error Do not #include this internal file directly; use public TBB headers instead.
19 #endif
20 
21 #define __TBB_machine_windows_intel64_H
22 
23 #define __TBB_WORDSIZE 8
24 #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE
25 
26 #include "msvc_ia32_common.h"
27 
28 #if !__TBB_MSVC_PART_WORD_INTERLOCKED_INTRINSICS_PRESENT
29 
30 #include <intrin.h>
31 #pragma intrinsic(_InterlockedCompareExchange,_InterlockedExchangeAdd,_InterlockedExchange)
32 #pragma intrinsic(_InterlockedCompareExchange64,_InterlockedExchangeAdd64,_InterlockedExchange64)
33 
34 // ATTENTION: if you ever change argument types in machine-specific primitives,
35 // please take care of atomic_word<> specializations in tbb/atomic.h
36 extern "C" {
37  __int8 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp1 (volatile void *ptr, __int8 value, __int8 comparand );
38  __int8 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd1 (volatile void *ptr, __int8 addend );
39  __int8 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore1 (volatile void *ptr, __int8 value );
40  __int16 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp2 (volatile void *ptr, __int16 value, __int16 comparand );
41  __int16 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd2 (volatile void *ptr, __int16 addend );
42  __int16 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore2 (volatile void *ptr, __int16 value );
43 }
44 
45 inline long __TBB_machine_cmpswp4 (volatile void *ptr, __int32 value, __int32 comparand ) {
46  return _InterlockedCompareExchange( (long*)ptr, value, comparand );
47 }
48 inline long __TBB_machine_fetchadd4 (volatile void *ptr, __int32 addend ) {
49  return _InterlockedExchangeAdd( (long*)ptr, addend );
50 }
51 inline long __TBB_machine_fetchstore4 (volatile void *ptr, __int32 value ) {
52  return _InterlockedExchange( (long*)ptr, value );
53 }
54 
55 inline __int64 __TBB_machine_cmpswp8 (volatile void *ptr, __int64 value, __int64 comparand ) {
56  return _InterlockedCompareExchange64( (__int64*)ptr, value, comparand );
57 }
58 inline __int64 __TBB_machine_fetchadd8 (volatile void *ptr, __int64 addend ) {
59  return _InterlockedExchangeAdd64( (__int64*)ptr, addend );
60 }
61 inline __int64 __TBB_machine_fetchstore8 (volatile void *ptr, __int64 value ) {
62  return _InterlockedExchange64( (__int64*)ptr, value );
63 }
64 
65 #endif /* __TBB_MSVC_PART_WORD_INTERLOCKED_INTRINSICS_PRESENT */
66 
67 #define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1
68 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1
69 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1
70 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1
__int64 __TBB_machine_fetchstore8(volatile void *ptr, __int64 value)
long __TBB_machine_fetchadd4(volatile void *ptr, __int32 addend)
long __TBB_machine_fetchstore4(volatile void *ptr, __int32 value)
__int8 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore1(volatile void *ptr, __int8 value)
__int64 __TBB_machine_cmpswp8(volatile void *ptr, __int64 value, __int64 comparand)
__int16 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore2(volatile void *ptr, __int16 value)
#define __TBB_EXPORTED_FUNC
long __TBB_machine_cmpswp4(volatile void *ptr, __int32 value, __int32 comparand)
__int16 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp2(volatile void *ptr, __int16 value, __int16 comparand)
__int16 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd2(volatile void *ptr, __int16 addend)
__int64 __TBB_machine_fetchadd8(volatile void *ptr, __int64 addend)
__int8 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd1(volatile void *ptr, __int8 addend)
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
__int8 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp1(volatile void *ptr, __int8 value, __int8 comparand)

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.