Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
ibm_aix51.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 // TODO: revise by comparing with mac_ppc.h
18 
19 #if !defined(__TBB_machine_H) || defined(__TBB_machine_ibm_aix51_H)
20 #error Do not #include this internal file directly; use public TBB headers instead.
21 #endif
22 
23 #define __TBB_machine_ibm_aix51_H
24 
25 #define __TBB_WORDSIZE 8
26 #define __TBB_ENDIANNESS __TBB_ENDIAN_BIG // assumption based on operating system
27 
28 #include <stdint.h>
29 #include <unistd.h>
30 #include <sched.h>
31 
32 extern "C" {
33 int32_t __TBB_machine_cas_32 (volatile void* ptr, int32_t value, int32_t comparand);
34 int64_t __TBB_machine_cas_64 (volatile void* ptr, int64_t value, int64_t comparand);
35 void __TBB_machine_flush ();
36 void __TBB_machine_lwsync ();
37 void __TBB_machine_isync ();
38 }
39 
40 // Mapping of old entry point names retained for the sake of backward binary compatibility
41 #define __TBB_machine_cmpswp4 __TBB_machine_cas_32
42 #define __TBB_machine_cmpswp8 __TBB_machine_cas_64
43 
44 #define __TBB_Yield() sched_yield()
45 
46 #define __TBB_USE_GENERIC_PART_WORD_CAS 1
47 #define __TBB_USE_GENERIC_FETCH_ADD 1
48 #define __TBB_USE_GENERIC_FETCH_STORE 1
49 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1
50 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1
51 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1
52 
53 #if __GNUC__
54  #define __TBB_control_consistency_helper() __asm__ __volatile__( "isync": : :"memory")
55  #define __TBB_acquire_consistency_helper() __asm__ __volatile__("lwsync": : :"memory")
56  #define __TBB_release_consistency_helper() __asm__ __volatile__("lwsync": : :"memory")
57  #define __TBB_full_memory_fence() __asm__ __volatile__( "sync": : :"memory")
58 #else
59  // IBM C++ Compiler does not support inline assembly
60  // TODO: Since XL 9.0 or earlier GCC syntax is supported. Replace with more
61  // lightweight implementation (like in mac_ppc.h)
62  #define __TBB_control_consistency_helper() __TBB_machine_isync ()
63  #define __TBB_acquire_consistency_helper() __TBB_machine_lwsync ()
64  #define __TBB_release_consistency_helper() __TBB_machine_lwsync ()
65  #define __TBB_full_memory_fence() __TBB_machine_flush ()
66 #endif
void __TBB_machine_flush()
int32_t __TBB_machine_cas_32(volatile void *ptr, int32_t value, int32_t comparand)
void __TBB_machine_isync()
int64_t __TBB_machine_cas_64(volatile void *ptr, int64_t value, int64_t comparand)
void __TBB_machine_lwsync()
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

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.