Nugget
compiler.h
1 // Copyright (c) Electronic Arts Inc. All rights reserved.
4 
5 
6 #ifndef EASTL_ATOMIC_INTERNAL_COMPILER_H
7 #define EASTL_ATOMIC_INTERNAL_COMPILER_H
8 
9 #if defined(EA_PRAGMA_ONCE_SUPPORTED)
10  #pragma once
11 #endif
12 
13 
15 //
16 // Include the compiler specific implementations
17 //
18 #if defined(EA_COMPILER_GNUC) || defined(__clang__)
19 
20  #include "gcc/compiler_gcc.h"
21 
22 #elif defined(EA_COMPILER_MSVC)
23 
24  #include "msvc/compiler_msvc.h"
25 
26 #endif
27 
28 
30 
31 
32 namespace eastl
33 {
34 
35 
36 namespace internal
37 {
38 
39 
69 typedef void (*CompilerBarrierDataDependencyFuncPtr)(void*);
70 
71 extern EASTL_API volatile CompilerBarrierDataDependencyFuncPtr gCompilerBarrierDataDependencyFunc;
72 
73 
74 #define EASTL_COMPILER_ATOMIC_COMPILER_BARRIER_DATA_DEPENDENCY_FUNC(ptr) \
75  eastl::internal::gCompilerBarrierDataDependencyFunc(ptr)
76 
77 
78 } // namespace internal
79 
80 
81 } // namespace eastl
82 
83 
85 
86 
87 #include "compiler_fetch_add.h"
88 #include "compiler_fetch_sub.h"
89 
90 #include "compiler_fetch_and.h"
91 #include "compiler_fetch_xor.h"
92 #include "compiler_fetch_or.h"
93 
94 #include "compiler_add_fetch.h"
95 #include "compiler_sub_fetch.h"
96 
97 #include "compiler_and_fetch.h"
98 #include "compiler_xor_fetch.h"
99 #include "compiler_or_fetch.h"
100 
101 #include "compiler_exchange.h"
102 
103 #include "compiler_cmpxchg_weak.h"
104 #include "compiler_cmpxchg_strong.h"
105 
106 #include "compiler_load.h"
107 #include "compiler_store.h"
108 
109 #include "compiler_barrier.h"
110 
111 #include "compiler_cpu_pause.h"
112 
113 #include "compiler_memory_barrier.h"
114 
115 #include "compiler_signal_fence.h"
116 
117 #include "compiler_thread_fence.h"
118 
119 
120 #endif /* EASTL_ATOMIC_INTERNAL_COMPILER_H */
EA Standard Template Library.
Definition: algorithm.h:288