Re: [spice-protocol] Use gcc builtin rather than asm for memory barriers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> This should make things more portable.
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=86997
> ---
>  spice/barrier.h | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/spice/barrier.h b/spice/barrier.h
> index 710da09..7d63721 100644
> --- a/spice/barrier.h
> +++ b/spice/barrier.h
> @@ -34,12 +34,7 @@
>  
>  #ifdef __GNUC__
>  
> -#ifdef __i386__
> -#define spice_mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": :
> :"memory")
> -#else
> -//mfence
> -#define spice_mb() __asm__ __volatile__ ("lock; addl $0,0(%%rsp)": :
> :"memory")
> -#endif
> +#define spice_mb() __sync_synchronize ()
>  
>  #else
>  
> --
> 2.5.0

Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx>

Compiles under RedHat 6.

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]