projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use kfile interface.
[bertos.git]
/
cfg
/
compiler.h
diff --git
a/cfg/compiler.h
b/cfg/compiler.h
index 96745521fe864280d5f9db85879db290a4bd3e5a..a303dc776115cc0ab9640d4eb208bfe366c950ad 100644
(file)
--- a/
cfg/compiler.h
+++ b/
cfg/compiler.h
@@
-37,8
+37,8
@@
* \author Bernardo Innocenti <bernie@develer.com>
*/
* \author Bernardo Innocenti <bernie@develer.com>
*/
-#ifndef
DEVLIB
_COMPILER_H
-#define
DEVLIB
_COMPILER_H
+#ifndef
BERTOS
_COMPILER_H
+#define
BERTOS
_COMPILER_H
#include <cpu/detect.h>
#include <cpu/detect.h>
@@
-181,6
+181,11
@@
#define RESTRICT __restrict__
#define MUST_CHECK __attribute__((warn_unused_result))
#define PACKED __attribute__((packed))
#define RESTRICT __restrict__
#define MUST_CHECK __attribute__((warn_unused_result))
#define PACKED __attribute__((packed))
+ /**
+ * Force compiler to realod context variable.
+ */
+ #define MEMORY_BARRIER asm volatile ("" : : : "memory")
+
#if GNUC_PREREQ(3,1)
#define DEPRECATED __attribute__((__deprecated__))
#endif
#if GNUC_PREREQ(3,1)
#define DEPRECATED __attribute__((__deprecated__))
#endif
@@
-211,6
+216,8
@@
#pragma GCC poison cin cout cerr clog
#endif
#pragma GCC poison cin cout cerr clog
#endif
+
+
#elif defined(__MWERKS__)
/* Compiler features */
#elif defined(__MWERKS__)
/* Compiler features */
@@
-313,6
+320,10
@@
#ifndef PACKED
#define PACKED /* nothing */
#endif
#ifndef PACKED
#define PACKED /* nothing */
#endif
+#ifndef MEMORY_BARRIER
+#define MEMORY_BARRIER /* nothing */
+#warning No memory barrier defined for select compiler. If you use the kernel check it.
+#endif
/* Misc definitions */
/* Misc definitions */
@@
-323,7
+334,6
@@
#define EOF (-1)
#endif
#define EOF (-1)
#endif
-
/* Support for hybrid C/C++ applications. */
#ifdef __cplusplus
#define EXTERN_C extern "C"
/* Support for hybrid C/C++ applications. */
#ifdef __cplusplus
#define EXTERN_C extern "C"
@@
-515,4
+525,4
@@
typedef unsigned char page_t; /**< Type for banked memory pages. */
do { (void)(&(var) == (type *)0); } while(0)
#endif
do { (void)(&(var) == (type *)0); } while(0)
#endif
-#endif /*
DEVLIB
_COMPILER_H */
+#endif /*
BERTOS
_COMPILER_H */