[openib-general] Re: Re: ANNOUNCE: First usable version of userspace verbs

Michael S. Tsirkin mst at mellanox.co.il
Fri Mar 11 05:23:12 PST 2005


Quoting r. Michael S. Tsirkin <mst at mellanox.co.il>:
> Subject: Re: Re: ANNOUNCE: First usable version of userspace verbs
> 
> Quoting r. Grant Grundler <iod00d at hp.com>:
> > Subject: Re: [openib-general] Re: ANNOUNCE: First usable version of userspace verbs
> > 
> > On Thu, Mar 10, 2005 at 10:29:20AM -0800, Roland Dreier wrote:
> > >     Michael> Applying the folowing patch fixes the problem for me for
> > >     Michael> x86_64.
> > > 
> > > Thanks for diagnosing this.  I think I want to work on a more general
> > > fix though.
> > 
> > Crap. /usr/include/linux/compiler.h shows "barrier" but on debian,
> > it's #ifdef __KERNEL__ only.
> I think its because its a kernel header. current distributions seem to
> put a copy of kernel headers under /usr/include/linux and /usr/include/asm.
> I suspect using these isnt allowed.

For example, wmb is in /usr/include/asm/system.h, including this on
SuSe 9.1 gives you:


~>cat foo.c
#include <asm/system.h>
~>gcc foo.c
In file included from /usr/include/asm/system.h:4,
                 from foo.c:1:
/usr/include/asm-x86_64/system.h: In function `__cmpxchg':
/usr/include/asm-x86_64/system.h:249: error: `LOCK_PREFIX' undeclared (first use in this function)
/usr/include/asm-x86_64/system.h:249: error: (Each undeclared identifier is reported only once
/usr/include/asm-x86_64/system.h:249: error: for each function it appears in.)
/usr/include/asm-x86_64/system.h:249: error: parse error before string constant
/usr/include/asm-x86_64/system.h:255: error: parse error before string constant
/usr/include/asm-x86_64/system.h:261: error: parse error before string constant
/usr/include/asm-x86_64/system.h:267: error: parse error before string constant
/usr/include/asm-x86_64/system.h: At top level:
/usr/include/asm-x86_64/system.h:279: error: parse error before "cmpxchg4_locked"
/usr/include/asm-x86_64/system.h:279: error: parse error before '*' token
/usr/include/asm-x86_64/system.h: In function `cmpxchg4_locked':
/usr/include/asm-x86_64/system.h:282: error: `new' undeclared (first use in this function)
/usr/include/asm-x86_64/system.h:282: error: `old' undeclared (first use in this function)
/usr/include/asm-x86_64/system.h:282: error: `__u32' undeclared (first use in this function)
/usr/include/asm-x86_64/system.h:282: error: parse error before ')' token

-- 
MST - Michael S. Tsirkin



More information about the general mailing list