]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] compiler.h scoping fixes
authorAndrew Morton <akpm@osdl.org>
Fri, 12 Mar 2004 00:15:34 +0000 (16:15 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 12 Mar 2004 00:15:34 +0000 (16:15 -0800)
From: Ville Nuorvala <vnuorval@tcs.hut.fi>

There are a few kernel-only things in compiler.h which should have been
placed inside __KERNEL__.

include/linux/compiler.h

index aeee438b861a02f69dd1674080d0c28fab02ff45..1daf6aaaea801a792d00482be1bc341b0af2208b 100644 (file)
 #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.
 #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 */