Messages in this thread | | | From | "Joakim Bentholm XQ (AS/EAB)" <> | Subject | PROBLEM: Compatibility problem with C++, i386 & ia64 platform | Date | Tue, 23 Nov 2004 13:54:12 +0100 |
| |
1. Compatibility errors when including <asm/system.h> with g++ compiler on i386 and ia64 platforms.
If you want to use the memory barrier macros mb(), rmb() and wmb(), as defined in <asm/system.h>.
On i386 platform: This will work if you use gcc, but not in g++, since the name of the parameter in the __cmpxchg(...) is new, which the C++ compiler will not accept. (new_val might have been a better choice ;-)
Function header --- static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) ---
On Itanium 2 platform: Compiling on Itanium 2 works if you add som typedefs and a define, which is normally defined when __KERNEL__ is enabled.
Prepended rows to the include of system.h --- #define __pa(x) x typedef long s64; typedef int s32; typedef unsigned long u64; typedef unsigned int u32; #include <asm/system.h> ---
Maybe the system.h is not supposed to be included outside the kernel? Is there a less crude way of getting hold of the macros?
Best Regards/JB
-- Joakim Bentholm joakim.xq.bentholm@ericsson.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |