Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Mar 2005 18:19:57 -0500
From:      Jake Burkholder <jake@locore.ca>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 72454 for review
Message-ID:  <4234CA9D.9080108@locore.ca>
In-Reply-To: <200503032211.j23MBlia013010@repoman.freebsd.org>
References:  <200503032211.j23MBlia013010@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:

>http://perforce.freebsd.org/chv.cgi?CH=72454
>
>Change 72454 by jhb@jhb_slimer on 2005/03/03 22:11:16
>
>	Clobber all memory for atomic ops with an acquire barrier.
>	
>	Suggested by:	   alc
>
>Affected files ...
>
>.. //depot/projects/smpng/sys/sparc64/include/atomic.h#7 edit
>
>Differences ...
>
>==== //depot/projects/smpng/sys/sparc64/include/atomic.h#7 (text+ko) ====
>
>@@ -90,6 +90,7 @@
> 	itype(sz) v;							\
> 	v = atomic_cas(p, e, s, sz);					\
> 	membar(LoadLoad | LoadStore);					\
>+	__asm __volatile("" : : : "memory");				\
> 	v;								\
> })
> 
>@@ -115,6 +116,7 @@
> 	itype(sz) t;							\
> 	t = atomic_op(p, op, v, sz);					\
> 	membar(LoadLoad | LoadStore);					\
>+	__asm __volatile("" : : : "memory");				\
> 	t;								\
> })
> 
>@@ -132,6 +134,7 @@
> 	itype(sz) v;							\
> 	v = atomic_load(p, sz);						\
> 	membar(LoadLoad | LoadStore);					\
>+	__asm __volatile("" : : : "memory");				\
> 	v;								\
> })
> 
>
>  
>
membar already has a memory clobber fwiw.

Jake



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