This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add atomic operations required by the new condition variable.


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, e.g. âatomic_fetch_or_releaseâ.)

Apart from the XXX bits, the changes look okay to me.

Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]