This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Add atomic operations required by the new condition variable.
- From: Florian Weimer <fweimer at redhat dot com>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Fri, 27 May 2016 11:13:20 +0200
- Subject: Re: [PATCH] Add atomic operations required by the new condition variable.
- Authentication-results: sourceware.org; auth=none
- References: <1464217452 dot 1779 dot 67 dot camel at localhost dot localdomain>
On 05/26/2016 01:04 AM, Torvald Riegel wrote:
+# ifndef atomic_exchange_relaxed
+/* XXX This unnecessarily has acquire MO. */
I don't understand the use of the XXX marker here. If there is a
potential bug, this needs a longer explanation. If this is just use of
an unnecessarily strong memory order, a generic remark somewhere in the
file that âarchitectures might override the following defines with
relaxed MO implementation for improved performanceâ or something like
that should address this, and that doesn't warrant an XXX marker.
(Ideally, our atomics and how to implement them should be documented in
internals manual, or we should use GCC atomics directly so that we don't
need our own documentation. But that's an old and separate discussion.
Using the GCC syntax would also avoid the unfortunate naming pattern,
Apart from the XXX bits, the changes look okay to me.