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)