[PATCH v3] Use CC atomic builtins on ARM - Mailing list pgsql-bugs

From Martin Pitt
Subject [PATCH v3] Use CC atomic builtins on ARM
Date
Msg-id 20120107103002.GB2822@piware.de
Whole thread Raw
In response to Re: [PATCH v2] Use CC atomic builtins as a fallback  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH v3] Use CC atomic builtins on ARM  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hello Tom, all,

happy new year everyone!

Tom Lane [2011-12-20 21:14 -0500]:
> So I'm thinking that removing the swpb ASM option is not such a good
> idea.  We could possibly test for __sync_lock_test_and_set first, and
> only use swpb if we're on ARM and don't have the builtin.

Tom Lane [2011-12-21 10:55 -0500]:
> Yeah, that was another thing I found worrisome while googling: there
> were a disturbingly large number of claims that __sync_lock_test_and_set
> and/or __sync_lock_release were flat-out broken on various combinations
> of gcc version and platform.  After reading that, there is no way at all
> that I'd accept your original patch to use these functions everywhere.
>
> For the moment I'm inclined to consider using these functions *only* on
> ARM, so as to limit our exposure to such bugs.  That would also limit
> the risk of using an inappropriate choice of lock width.

OK, fair enough. New patch attached, which does exactly this now.
Third time is the charm!

Thanks,

Martin

--
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6384: pg_types_date.h does not exist
Next
From: Tom Lane
Date:
Subject: Re: [PATCH v3] Use CC atomic builtins on ARM