svn commit: r184759 - user/kmacy/HEAD_fast_multi_xmit/sys/net

Kip Macy kmacy at freebsd.org
Fri Nov 7 21:03:25 PST 2008


I doubt it, but would be happy to be proven incorrect. So ... yes, please.

Cheers,
Kip


On Sat, Nov 8, 2008 at 4:33 AM, M. Warner Losh <imp at bsdimp.com> wrote:
> 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
>



-- 
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis


More information about the svn-src-user mailing list