This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Remove incorrect default implementation of atomics.
- From: Torvald Riegel <triegel at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Tue, 09 Dec 2014 10:40:59 +0100
- Subject: Re: [PATCH] Remove incorrect default implementation of atomics.
- Authentication-results: sourceware.org; auth=none
- References: <1418059612 dot 25868 dot 84 dot camel at triegel dot csb> <20141208211344 dot AC9AA2C3A9F at topped-with-meat dot com>
On Mon, 2014-12-08 at 13:13 -0800, Roland McGrath wrote:
> Stub headers like that exist to document the internal API for that sysdeps header.
But that's not true in this case, at least not with the code we have.
It doesn't define any of the barriers, nor has a full set of operations,
nor explains the actual synchronization semantics.
The only useful documentation that we have is in include/atomic.h, which
uses bits/atomic.h or its arch-specific variants. The archs with weak
memory models (ARM, Power, ...) are also a good source of information.
But bits/atomics.h is definitely not a documentation of an internal API.
For the newer C11-like atomics, documentation is in the wiki and the C11
standard. In the long run, we'll have just this as internal API.
Thus, I think it doesn't serve any actual purpose. If you want the
internal API of the old-style atomics to be documented, I can
additionally prepare a patch with that for include/atomic.h.