On 19 Jan 2012, at 18:09, Ed Schouten wrote:

> In the very nearby future (after I switch SPARC64 and MIPS to
> libcompiler_rt), it should be possible to safely use C11's <stdatomic.h>
> on all supported architectures. The C11 interface allows any operation
> to be combined with any type of barrier.
> 
> Maybe we should simply migrate this code to use <stdatomic.h> then?

Currently, that will give worse code if we use gcc 4.2.1, but (I hope!) better 
code if we use clang.  With GCC, we are implementing atomic_thread_fence() as 
__sync_synchronize(), which is a full barrier, and ignoring its argument.  It 
would probably be worth postponing any such migration until:

1) Clang is the default compiler, and
2) The bugs in LLVM that cause the back end to fatal error on any nontrivial 
code using atomics are fixed.

David_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to