svn commit: r184759 - user/kmacy/HEAD_fast_multi_xmit/sys/net
M. Warner Losh
imp at bsdimp.com
Fri Nov 7 20:32:29 PST 2008
In message: <200811080202.mA822D0W098283 at svn.freebsd.org>
Kip Macy <kmacy at FreeBSD.org> writes:
: +#if defined (__GNUC__)
: + #if #cpu(i386) || defined __i386 || defined i386 || defined __i386__ || #cpu(x86_64) || defined __x86_64__
: + #define mb() __asm__ __volatile__ ("sfence;": : :"memory")
: + #elif #cpu(sparc64) || defined sparc64 || defined __sparcv9
: + #define mb() __asm__ __volatile__ ("membar #MemIssue": : :"memory")
: + #elif #cpu(sparc) || defined sparc || defined __sparc__
: + #define mb() __asm__ __volatile__ ("stbar;": : :"memory")
: + #else
: + #define mb() /* XXX just to make this compile */
: + #endif
: +#else
: + #error "unknown compiler"
: +#endif
I thought that gcc had a sequence that did this in a platform
independent way. should I dig it up for you?
Warner
More information about the svn-src-user
mailing list