Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Nov 2008 04:38:25 +0000
From:      "Kip Macy" <kmacy@freebsd.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   Re: svn commit: r184759 - user/kmacy/HEAD_fast_multi_xmit/sys/net
Message-ID:  <3c1674c90811072038q1fd750c0t23073a2cc49f30dd@mail.gmail.com>
In-Reply-To: <20081107.213326.-363916120.imp@bsdimp.com>
References:  <200811080202.mA822D0W098283@svn.freebsd.org> <20081107.213326.-363916120.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@bsdimp.com> wrote:
> In message: <200811080202.mA822D0W098283@svn.freebsd.org>
>            Kip Macy <kmacy@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3c1674c90811072038q1fd750c0t23073a2cc49f30dd>