summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-03-11 16:15:34 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-03-11 16:15:34 -0800
commitd398efb9709f906800c1394a2aa821b2e657447a (patch)
tree62c3d1708b90d1ad40f0cf38ca553132caa42c84 /include/linux
parent3b704d3fb7eeb7984d49162d6675e4505d7dab52 (diff)
[PATCH] compiler.h scoping fixes
From: Ville Nuorvala <vnuorval@tcs.hut.fi> There are a few kernel-only things in compiler.h which should have been placed inside __KERNEL__.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/compiler.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index aeee438b861a..1daf6aaaea80 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -39,6 +39,20 @@
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
+/* Optimization barrier */
+#ifndef barrier
+# define barrier() __memory_barrier()
+#endif
+
+#ifndef RELOC_HIDE
+# define RELOC_HIDE(ptr, off) \
+ ({ unsigned long __ptr; \
+ __ptr = (unsigned long) (ptr); \
+ (typeof(ptr)) (__ptr + (off)); })
+#endif
+
+#endif /* __KERNEL__ */
+
/*
* Allow us to mark functions as 'deprecated' and have gcc emit a nice
* warning for each use, in hopes of speeding the functions removal.
@@ -100,18 +114,4 @@
#define noinline
#endif
-/* Optimization barrier */
-#ifndef barrier
-# define barrier() __memory_barrier()
-#endif
-
-#ifndef RELOC_HIDE
-# define RELOC_HIDE(ptr, off) \
- ({ unsigned long __ptr; \
- __ptr = (unsigned long) (ptr); \
- (typeof(ptr)) (__ptr + (off)); })
-#endif
-
-#endif /* __KERNEL__ */
-
#endif /* __LINUX_COMPILER_H */