svn commit: r238907 - projects/calloutng/sys/kern

Konstantin Belousov kostikbel at gmail.com
Tue Sep 18 08:33:38 UTC 2012


On Tue, Sep 18, 2012 at 01:13:08AM +0100, Attilio Rao wrote:
> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
> index 8224672..fc6a75f 100644
> --- a/sys/sys/cdefs.h
> +++ b/sys/sys/cdefs.h
> @@ -114,6 +114,13 @@
>  #endif
> 
>  /*
> + * Compiler memory barriers, specific to gcc and clang.
> + */
> +#if defined(__GNUC__)
> +#define        __compiler_membar()     __asm __volatile(" " : : : "memory")
> +#endif
> +
> +/*

Traditionally, we do provide the fallback for non-GNUC compilers, by
defining extern function with the compatible signature. In this case,
the empty function just works for the purpose, although with higher
overhead than the GNUC case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20120918/162f8b4e/attachment.pgp


More information about the svn-src-projects mailing list