This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Remove incorrect default implementation of atomics.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Mon, 8 Dec 2014 21:30:06 +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>
On Mon, Dec 08, 2014 at 06:26:52PM +0100, Torvald Riegel wrote:
> There's a default implementation of atomic operations that just uses
> sequential code. This is incorrect because it at least would need
> proper compiler barriers, unless the arch using this somehow (can)
> make(s) assumptions about the compiler's optimizations too.
>
> I don't think it's useful to keep this. Every arch should have a
> correct implementation of atomics; having an incorrect default
> implementation is just error-prone.
>
Its dead header, As every supported gcc has __sync builin one could also
use it instead of this.
>
> 2014-12-09 Torvald Riegel <triegel@redhat.com>
>
> * bits/atomic.h: Remove file.