membar.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 by Julian Wiesener
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * As a special exception, you may use this file as part of a free
10  * software library without restriction. Specifically, if other files
11  * instantiate templates or use macros or inline functions from this
12  * file, or you compile this file and link it with other files to
13  * produce an executable, this file does not by itself cause the
14  * resulting executable to be covered by the GNU General Public
15  * License. This exception does not however invalidate any other
16  * reasons why the executable file might be covered by the GNU Library
17  * General Public License.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free Software
26  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27  */
28 #ifndef CXXTOOLS_MEMBAR_H
29 #define CXXTOOLS_MEMBAR_H
30 
31 #include <cxxtools/config.h>
32 
33 #if defined(CXXTOOLS_ATOMICITY_SUN)
34  #include <cxxtools/membar.sun.h>
35 
36 #elif defined(CXXTOOLS_ATOMICITY_WINDOWS)
37  #include <cxxtools/membar.windows.h>
38 
39 #elif defined(CXXTOOLS_ATOMICITY_GCC_ARM)
40  #include <cxxtools/membar.gcc.arm.h>
41 
42 #elif defined(CXXTOOLS_ATOMICITY_GCC_MIPS)
44 
45 #elif defined(CXXTOOLS_ATOMICITY_GCC_AVR32)
46  #include <cxxtools/membar.gcc.nonsmp.h>
47 
48 #elif defined(CXXTOOLS_ATOMICITY_GCC_SPARC32)
50 
51 #elif defined(CXXTOOLS_ATOMICITY_GCC_SPARC)
53 
54 #elif defined(CXXTOOLS_ATOMICITY_GCC_X86_64)
55  #include <cxxtools/membar.gcc.x86.h>
56 
57 #elif defined(CXXTOOLS_ATOMICITY_GCC_X86)
58  #include <cxxtools/membar.gcc.x86.h>
59 
60 #elif defined(CXXTOOLS_ATOMICITY_GCC_PPC)
61  #include <cxxtools/membar.gcc.ppc.h>
62 
63 #elif defined(_WIN32) || defined(WIN32) || defined(_WIN32_WCE)
64  #include <cxxtools/membar.windows.h>
65 
66 #elif defined(__sun)
67  #include <cxxtools/membar.sun.h>
68 
69 #elif defined(__GNUC__) || defined(__xlC__) || \
70  defined(__SUNPRO_CC) || defined(__SUNPRO_C)
71 
72  #if defined (i386) || defined(__i386) || defined (__i386__) || \
73  defined(_X86_) || defined(sun386) || defined (_M_IX86) || \
74  defined(__x86_64__) || defined(__amd64__)
75  #include <cxxtools/membar.gcc.x86.h>
76 
77  #elif defined (ARM) || defined(__arm__) || defined(_M_ARM) || defined(_M_ARMT)
78  #include <cxxtools/membar.gcc.arm.h>
79 
80  #elif defined (AVR) || defined(__AVR__)
81  #include <cxxtools/membar.gcc.nonsmp.h>
82 
83  #elif defined( _M_PPC ) || defined( PPC ) || \
84  defined( ppc ) || defined( __powerpc__ ) || \
85  defined( __ppc__ )
86  #include <cxxtools/membar.gcc.ppc.h>
87 
88  #elif defined(__mips__) || defined(MIPSEB) || defined(_MIPSEB) || \
89  defined(MIPSEL) || defined(_MIPSEL)
91 
92  #elif defined(__sparcv9)
94 
95  #elif defined(__sparc__) || defined(sparc) || defined(__sparc) || \
96  defined(__sparcv8)
98 
99  #else
100  #include <cxxtools/membar.gcc.h>
101 
102  #endif
103 
104 #else
105  #error "unknown architecture"
106 
107 #endif
108 
109 #endif // CXXTOOLS_MEMBAR_H