This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Purpose of USE_ATOMIC_COMPILER_BUILTINS
- From: Torvald Riegel <triegel at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Florian Weimer <fweimer at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 27 Nov 2015 12:00:13 +0100
- Subject: Re: Purpose of USE_ATOMIC_COMPILER_BUILTINS
- Authentication-results: sourceware.org; auth=none
- References: <5649F832 dot 7000001 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1511161758300 dot 30498 at digraph dot polyomino dot org dot uk> <564A1C64 dot 8010008 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1511161825030 dot 30498 at digraph dot polyomino dot org dot uk> <564AF80C dot 8050909 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1511171029450 dot 16689 at digraph dot polyomino dot org dot uk>
On Tue, 2015-11-17 at 10:49 +0000, Joseph Myers wrote:
> I think the first priorities regarding USE_ATOMIC_COMPILER_BUILTINS should
> be converting more architectures to use it at least in the cases where the
> code will be expanded inline, and reducing the amount of code present in
> architecture-specific atomic-machine.h files when
> USE_ATOMIC_COMPILER_BUILTINS is defined (why should they need anything
> more than USE_ATOMIC_COMPILER_BUILTINS and __HAVE_64B_ATOMICS?).
Yes.
If you are just a user of the atomics, use the C11-like atomics and
you're good. If you want to improve the implementation of glibc's
atomics, what Joseph says is a good thing to work on.