MulticoreBSP for C  Version 2.0.4
mcbsp-internal-macros.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015
3  *
4  * Created 2nd of April, 2015 by Albert-Jan N. Yzelman
5  *
6  * This file is part of MulticoreBSP in C --
7  * a port of the original Java-based MulticoreBSP.
8  *
9  * MulticoreBSP for C is distributed as part of the original
10  * MulticoreBSP and is free software: you can redistribute
11  * it and/or modify it under the terms of the GNU Lesser
12  * General Public License as published by the Free Software
13  * Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  * MulticoreBSP is distributed in the hope that it will be
16  * useful, but WITHOUT ANY WARRANTY; without even the
17  * implied warranty of MERCHANTABILITY or FITNESS FOR A
18  * PARTICULAR PURPOSE. See the GNU Lesser General Public
19  * License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General
22  * Public License along with MulticoreBSP. If not, see
23  * <http://www.gnu.org/licenses/>.
24  */
25 
26 #ifndef _H_MCBSP_INTERNAL_MACROS
27 #define _H_MCBSP_INTERNAL_MACROS
28 
29 #ifdef __GNUC__
30  #ifndef _GNU_SOURCE
31  #define _GNU_SOURCE
32  #endif
33 #endif
34 
35 #ifdef __DOXYGEN__
36 
54  #define MCBSP_ENABLE_FAKE_HP_DIRECTIVES
55 
67  #define MCBSP_USE_MUTEXES
68 
81  #define MCBSP_USE_SPINLOCK
82 
93  #define MCBSP_USE_SYSTEM_MEMCPY
94 
112  #define MCBSP_USE_CUSTOM_MEMCPY
113 
135  #define MCBSP_ALLOW_MULTIPLE_REGS
136 
144  #define MCBSP_NO_CHECKS
145 
159  #define MCBSP_ENABLE_HP_DIRECTIVES
160 
165  #define MCBSP_DISABLE_COMPILATION_MODE_WARNING
166 #endif
167 
172 #define MCBSP_ALIGNMENT 128
173 
178 #define MCBSP_CA_SYNC
179 
180 #ifndef MCBSP_USE_MUTEXES
181  #define MCBSP_USE_SPINLOCK
182 #else
183  #ifdef MCBSP_USE_SPINLOCK
184  #pragma message "Warning: MCBSP_USE_MUTEXES takes precedence over MCBSP_USE_SPINLOCK"
185  #undef MCBSP_USE_SPINLOCK
186  #endif
187 #endif
188 
189 #ifdef MCBSP_USE_SYSTEM_MEMCPY
190  #ifdef MCBSP_USE_CUSTOM_MEMCPY
191  #pragma message "Warning: MCBSP_USE_SYSTEM_MEMCPY takes precedence over MCBSP_USE_CUSTOM_MEMCPY"
192  #undef MCBSP_USE_CUSTOM_MEMCPY
193  #endif
194 #else
195  #define MCBSP_USE_CUSTOM_MEMCPY
196 #endif
197 
198 #endif
199