lkml.org 
[lkml]   [2004]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectPROBLEM: Compatibility problem with C++, i386 & ia64 platform
Date
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/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.049 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site