Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb] - Mailing list pgsql-bugs

From Robert Haas
Subject Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]
Date
Msg-id CA+TgmoZzgNrWT3af50YL3_zfSN8AtNXK9sOeACti=5ukwiR0vg@mail.gmail.com
Whole thread Raw
In response to [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]  (Martin Pitt <mpitt@debian.org>)
Responses Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]
Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]
[PATCH v2] Use CC atomic builtins as a fallback
List pgsql-bugs
On Sun, Dec 18, 2011 at 5:42 PM, Martin Pitt <mpitt@debian.org> wrote:
>> It probably makes sense to use it on any platform where it's
>> defined. Presumably an implementation provided by the compiler is
>> always going to be at least as good as any magic assembler
>> incantations we can come up with.
>
> I agree. How about a patch like this? It uses builtin atomics if
> available, and falls back to the custom implementations if not.

-1.  Absent some evidence that gcc's implementations are superior to
ours, I think we should not change stuff that works now.  That's
likely to lead to subtle bugs that are hard to find and perhaps
dependent on the exact compiler version used.

But I'm completely cool with doing this for platforms where we haven't
otherwise got an implementation.  Any port in a storm.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-bugs by date:

Previous
From: "Andrea Grassi"
Date:
Subject: R: R: BUG #6342: libpq blocks forever in "poll" function
Next
From: Andrew Milne
Date:
Subject: Re: BUG #6309: ECPG pre-processor issue